Error code 5: Access is denied

Get help for specific problems
Posts: 1
Joined: 27 Apr 2016

keef2016

I am using the current version of FreeFileSync V8.1 April 21 2016.

I have created a sync job using the update sync method of about 14 left & right pairs, where the target is another physical drive on my Windows 10 Home (32 bit) pc. If I use Compare & sync it works well for a few times. Then I created a batch job from there and opened it in RealTimeSync just to get the command line arguments to use in Windows Task Scheduler, where I just created a basic task to run a program daily & used the two halves on the command line section of RealTimeSync to enter the first half as the program to run & the second in the arguments box.

If I run this a few times all is fine. Then another run either from the batch job or the FreeFileSync GUI, I start to get the error

“Cannot set directory lock for <target folder>”
“Cannot write file <target folder>\sync.ffs_lock”
“Error code 5: Access is denied. (Create File)”

I have attached a screenshot of this.

Please can someone tell me what I am doing wrong?
Attachments
FreefileSync error.png
FreefileSync error.png (30.07 KiB) Viewed 17993 times
Posts: 1
Joined: 10 May 2016

okanagan

I was experiencing the 'Error code 5: Access is denied' issue, not over the same process you were having problems with, rather it was over moving files to the FFS recycle bin during an update sync.
I found I was able to overcome the issue by running FFS as an administrator.
I was already logged in to Windows as an administrator but it seems that wasn't enough.
Anyway, this fixed my error, might help you?
Posts: 14
Joined: 13 May 2016

bromberg

I right-clicked on the FFS icon and RAN AS ADMIN - worked for me as well!
Why is this not documented in the FFS "manual" (or if it is it's not easy to find; they should have a tab for their error codes).
Dan
User avatar
Posts: 71
Joined: 22 May 2006

Giangi

Sorry for bumping this old topic, but since I'm moving my old Win7 laptop to a new one with Win10 I'm facing the same issue.
On the old Win7 UAC was off while on Win10 is enabled (because it cannot be really disabled as on Win7).

The two folders I'm sync'ing are one on my laptop and the other on an external USB disk:

- both ACL are .\Administrators Full Ctrl, .\Users Read/Execute
- my (domain) account is member of the local .\Administrators
- running FFS elevated solve the problem

Question is: do I have to just always run FFS elevated? I may solve the problem changing ACLs to .\Users Change but since the pc is a domain member I do not like that everybody may access it! I could add myself directly into the ACL but this option too isn't the best one...

Thank you
Giangi
Posts: 22
Joined: 31 Jul 2016

eRCaGuy

I think I found the problem (for me at least). I navigated to the *source* for the file that would not copy, and when I right clicked it and went to "Properties" I see the following very interesting statement that I've never seen before. Running FreeFileSync as an Administrator does NOT fix the problem.

Neither does clicking the "Unblock" button below. :(
2017-09-29 10_18_03-Unblock snippet.png
2017-09-29 10_18_03-Unblock snippet.png (3.98 KiB) Viewed 16096 times
UPDATE: THE FILE WAS ALSO MARKED AS "READ ONLY." I unchecked the "read only" attribute box, then the Unblock button worked, then I rechecked the read only attribute box. Windows--what a piece of garbage!

Anyway, the Error Code 5 went away on that file now, so problem solved!

FYI, for a little more reading on the subject see here: https://superuser.com/questions/38476/this-file-came-from-another-computer-how-can-i-unblock-all-the-files-in-a/1099381