2

I've finally got an old computer of mine running as a backup server with Ubuntu 11.10. I'm planning on using it to backup my Windows 7 machine weekly using rsync. I've got cygwin installed, and rsync works perfectly. I'm following this guide, though, to create it as a scheduled task:

http://justinsomnia.org/2007/02/how-to-regularly-backup-windows-xp-to-ubuntu-using-rsync/

I have an rsync.bat script in C:\, and I can get the script to run correctly if I run it directly from the command line in Cygwin. However, when I try to run the rsync.bat script, I get this:

ERROR: password file must not be other-accessible

So it must be permissions issues on the secret file...I followed that guide and set the permissions to 600, and chowned it to Nate[the administrator]:SYSTEM.

Any ideas on what might be causing the problem?

EDIT: The file in question is actually on the Windows 7 machine. I figured I should ask here, since I'm dealing specifically with Cygwin and Rsync.

After some googling, I found that there is a "strict modes" option that tells rsync not to check the permissions on the secret files, and that was added to accomodate Windows systems. However, after adding it and restarting the rsyn daemon, I still seem to be getting the same error. Here's my rysncd.conf file:

[rsync]

path = /home/nate/backups
comment = My backups
uid = nate
gid = nate
read only = false
auth users = nate
secrets file = /etc/rsyncd.secrets
strict modes = false

And the permissions on the secrets file, according to cygwin:

-rw-------  1 Nate SYSTEM   11 Dec  9 18:48 secret

I feel like I must be missing something really obvious.

2
  • Is your filesystem NTFS or FAT? FAT32 filesystems do not support individual file permissions.
    – nopcorn
    Dec 14, 2011 at 18:31
  • Sorry, I don't think I clarified. The secret file that's giving me issues is the one on the Windows 7 machine, that's in the cygdrive. So it's NTFS.
    – Nate
    Dec 14, 2011 at 18:35

3 Answers 3

1

I was able to fix this issue by changing the password-file line to the following:

–password-file=/cygdrive/c/cygwin/secret

1

Make sure to do the following:

1) Change mode of the password file to -rw------- , for example having a password file C:/Custom/syncjob/pwfile on Windows, using Cygwin, go to password file location:

cd /cygdrive/c/Custom/syncjob

and then

chmod 600 ./pwfile

2) Also change ownership of the password file to the user that is executing the rsync job, for example 'Dave':

chown Dave ./pw

3) It might help to refer to password file as -password-file=/cygdrive/c/... like Nate wrote.

I don't think it is necessary to change rsync configuration.

A known workaround for Windows is to append

< pwfile

to the end of the rsync command.

Good luck.

0

None of the above helped. Finally I found that the line endings of pwfile should read as follows:

$ od -c pwfile
0000000   s   e   c   r   e   t   s  \n     (Unix)
NOT
0000000   s   e   c   r   e   t   s  \r  \n (Windows)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .