I'm using robocopy to sync files between two different servers (one of them is not a Windows server but exposes Windows-like shares); but I'm having a permission issue.
I need to replicate all contents and also keep existing ACLs; I'm using a command like this:
robocopy.exe \\server1\share \\server2\share /mir /copyall
However, the user account which runs this command has only read access to some folders; this leads to an interesting problem: after the first sync, the same permissions are applied to the copied folders... and thus the user account loses write access to those folders and can't update them anymore.
Is there any way to avoid or fix this?