Disable Lock Directories During Sync when running from SYSTEM

Get help for specific problems
Posts: 19
Joined: 5 Nov 2010

sf2010

When running RealtimeSync from Task Scheduler set to run as user SYSTEM on Windows 8, how do I disble Lock Directories During Sync please?

I have some read-only file shares and I'm guessing this is why RTS is not mirroring the folder.

I'm using FFS 6.9.

Many thanks.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

Directory locking can be disabled via GlobalSettings.xml.
Posts: 19
Joined: 5 Nov 2010

sf2010

I found that but there isn't an %appdata% folder for the SYSTEM user.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

Should be in
C:\Windows\System32\config\systemprofile\AppData\Roaming\FreeFileSync
Posts: 19
Joined: 5 Nov 2010

sf2010

There was no GlobalSettings.xml under either:
C:\Windows\system32\config\systemprofile\appdata\local\freefilesync
C:\Windows\system32\config\systemprofile\appdata\roaming\freefilesync

So I copied the one from my profile and ensured both below were set to false:
LockDirectoriesDuringSync
WarnDirectoryLockFailed Enabled

Task scheduler runs RTS but no logs under the systemprofile folders. So I set a particular log folder but still nothing.

When I run manually it errors as expected as I don't have permission but the log file is created.

I've created another task scheduler entry for RTS on a folder without the read-only permissions and all works fine.

Am I missing a setting somewhere or are the GlobalSettings not being read please?
Posts: 19
Joined: 5 Nov 2010

sf2010

Here's results when manually running from a Windows login that similarly has read-only access to the source share and write access to the local target:

[21:45:55] Info: Starting comparison
[21:45:55] Warning: Cannot set directory lock for "\\CENTRAL-PC\FamilyRO\".
Cannot write file "\\CENTRAL-PC\FamilyRO\sync.ffs_lock".
Error Code 5: Access is denied. (CreateFile)
[21:45:55] Info: Synchronising folder pair:
\\CENTRAL-PC\FamilyRO\
C:\Shared\FamilyRO\
[21:45:55] Info: Creating file "C:\Shared\FamilyRO\Pictures\2015 Activities\20150830_144131.jpg"
etc...

This same job doesn't work using task scheduler and the system account and I can't find any ouput to help me discover why!

Thanks in advance.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

One of your network paths is probably not accessible from the SYSTEM account so that RTS is waiting endlessly for the path to appear. Consequently FFS is never started.
Posts: 19
Joined: 5 Nov 2010

sf2010

I think you've hit the nail on the head Zenju. It looks like the SYSTEM account doesn't count as EVERYONE.

I've added permissions for ANONYMOUS LOGON to the file share on the server PC. But still SYSTEM on the client PC can't read it.

Some more looking up Windows permissions required! But thanks for pointing me in the right direction.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

The simplest solution is probably to just use the same user in task scheduler like for your manual tests. This reduces the risk of suprises caused by different user permissions.