I am try to use rsync from my windows box (under cygwin) to back up "My Documents" on to a debian server (known on my home network as roo.home) running rsyncd from inetd where it is run as root. my rsyncd.conf file sets the gid and uid to user backup.backup thusly:- syslog facility = daemon uid = backup gid = backup hosts allow = 192.168.0.0/24 hosts deny = 0.0.0.0/0 timeout = 600 read only = false [rabbit] path = /bak/rabbit comment = work computer (rabbit) backup area [pooh] ... Inside /bak/rabbit are two directories - backup and archive, both of which are owned by backup.backup . backup dir has permissions of 770 , archive (which seems to have been created automatically by rsync has 755 (I assume because of a umask somewhere of 022). As a test - I created a file (also with owner backup.backup) /bak/rabbit/backup/My\ Documents/test.file I run the command from the windows box as follows (excluding mail induced word wrap) rsync -axq --modify-window=2 --delete --exclude=Mail/ --backup --backup-dir=/archive ~/My\ Documents/ roo.home::rabbit/backup/My\ Documents/ and get the following error message rsync: keep_backup failed: "/backup/My Documents/test.file" (in rabbit) -> "/archive/test.file": Permission denied (13) rsync: stat "/archive/test.file" (in rabbit) failed: No such file or directory (2) (and pretty much the same thing has been logged at the server end) WHY? - everything at the server end is user backup group backup. -- Alan Chandler http://www.chandlerfamily.org.uk Open Source. It's the difference between trust and antitrust.
On Sunday 20 Nov 2005 16:32, you wrote:> On 11/19/05, Alan Chandler <alan@chandlerfamily.org.uk> wrote: > > [...] > > > > rsync -axq --modify-window=2 --delete --exclude=Mail/ --backup > > --backup-dir=/archive ~/My\ Documents/ roo.home::rabbit/backup/My\ > > Documents/ > > > > and get the following error message > > > > rsync: keep_backup failed: "/backup/My Documents/test.file" (in rabbit) > > -> "/archive/test.file": Permission denied (13) > > rsync: stat "/archive/test.file" (in rabbit) failed: No such file or > > directory (2) > > I'm not 100% sure, but I think --backup-dir overrides the directory > set in the DEST field of the command line... so you're trying to > backup to roo.home::/archive rather than to > roo.home::/bak/rabbit/rabbit/backup/My\ Documents.Lets keep the discussion on the mailing list ... ... but I tried an experiment and changed --backup-dir to /archive2, and in this case the archive directory was created in the correct place (as /bak/rabbit/archive2 - you snipped that bit of my original message) (although I still got the permissions error and the file wasn't created). So I don't think that is true. -- Alan Chandler http://www.chandlerfamily.org.uk Open Source. It's the difference between trust and antitrust.
On Sat 19 Nov 2005, Alan Chandler wrote:> my rsyncd.conf file sets the gid and uid to user backup.backup thusly:- > > syslog facility = daemon > uid = backup > gid = backup > hosts allow = 192.168.0.0/24 > hosts deny = 0.0.0.0/0 > timeout = 600 > read only = false > > [rabbit]Move the "read only = false" to the module definition; it's listed as a module directive, not as a global option. Paul Slootman
On Sat, Nov 19, 2005 at 10:29:01AM +0000, Alan Chandler wrote:> rsync: keep_backup failed: "/backup/My Documents/test.file" (in rabbit) -> > "/archive/test.file": Permission denied (13)This is an error from your OS, so it I have no way to discern (without probing your system) what reason the rename() call has for failing. The options you gave should cause rsync to try to rename this file: "/bak/rabbit/backup/My Documents/test.file" to this file: /bak/rabbit/archive/test.file You might try setting "use chmod = no" in your rsync.conf file and see if that makes any difference. If it does not, I'd suggest adding a debug rprintf() call to the do_rename() function in syscall.c: int do_rename(char *fname1, char *fname2) { int ret; /* add */ if (dry_run) return 0; RETURN_ERROR_IF_RO_OR_LO; ret = rename(fname1, fname2); /* changed */ rprintf(FLOG, "fname1=`%s', fname2=`%s', ret=%d, errno=%d\n", fname1, fname2, ret, errno); /* add */ return ret; /* add */ } That will output (into the daemon log file) exactly what the attempted rename was and its result. If that fails, you should try to figure out why the OS refuses to allow that rename. ..wayne..