Environment:
Windows 7 x64 Enterprise
CWRsync rsync.exe 3.0.9
We use the latest builds of cwRsync to push files from a client to a remote server. We password-protect the operation using a client-side password file, that is passed to rsync.exe using the --password-file= option. However, rsync.exe complains that the password file permissions are incorrect:
ERROR: password file must not be other-accessible
No matter what I do, using cacls.exe or the rsync-supplied chmod.exe, I cannot seem to get the permissions right to avoid this error. Please provide guidance for setting the correct permissions on this file to avoid this error.
Thank you
Mike McCarty
This is one of the rsync features that doesn't work on Windows: Rsync uses Unix-like permissions to check if the file is accessible by everyone. As a workaround, you can pipe your password file into rsync:
rsync ........ < passwd-file
Hope it helps.
Thank you for the response.
I suppose I can try this workaround, but I'm not confident it will work for my purposes - I'm using rsync in a set of automated batch jobs that already do strange things with redirecting input and output.
As it appears I am not the first person to run into this issue, could I inquire as to whether there will ever be a way to suppress this check in Windows builds of the cwRsync product ? Perhaps a command line switch, or that bit of code could be wrapped in some #ifdefs to conditionally compile it out ?
Thank you.
Mike
I have now compiled rsync with an unofficial patch removing strict checking of password file at the client side:
Patched version is available via support downloads page.
Use the cygwin included bash in order to get windows out of the way:
c:\cygwin\bin\bash -c '/cygdrive/c/cygwin/bin/rsync -avz --password-file=/cygdrive/c/cygwin/secret /something/ rsync://somewhere/node'