Permissions problem I don't understand

Wayne Davison wayned at samba.org
Tue Nov 29 16:28:29 GMT 2005


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..


More information about the rsync mailing list