Post by Al Savage<a name="error3"></a><font color=red>rsync: failed to set permissions on
"U:/ftpserver/ftpd.exe": Permission denied (13)
Permission denied (13)
OK, I think I see what's going on, though not why.
Luckybackup is running the rsync twice, to synchronize the source &
dest, and copy works one direction, but not the other, because the exe
is in use.
However, I don't see why rsync should even be trying to copy in the
direction it is. The timestamp on the file is such that the --update
ought to ignore trying to copy.
[C:\programs\rsync]dir f:\ftpserver\ftpd.exe
The volume label in drive F is F_Web.
The Volume Serial Number is BAA3:A5BF.
Directory of F:\ftpserver
3-09-13 9:44p 126,318 7,058 a--- ftpd.exe
1 file(s) 126,318 bytes used
949,291,581 K bytes free
[C:\programs\rsync]dir u:\ftpserver\ftpd.exe
The volume label in drive U is F_DRIVE.
The Volume Serial Number is 2A48:C014.
Directory of U:\ftpserver
3-09-13 9:44p 126,318 7,058 a--- ftpd.exe
1 file(s) 126,318 bytes used
17,595,110 K bytes free
ftpd.exe is the same timestamp on both U: and F:
[C:\programs\rsync]rsync -h --progress --stats -r -tgo -p -l -D --update
--xattrs --modify-window=10 --os2-perms F:\ftpserver\ftpd.exe
U:\ftpserver
sending incremental file list
rsync: failed to set permissions on "U:/ftpserver/ftpd.exe": Permission
denied (13)
Number of files: 1
Number of files transferred: 0
[ . . . ]
rsync error: some files/attrs were not transferred (see previous errors)
(code 23) at main.c(1176) [sender=3.0.9]
[later]
This is the line that luckybackup builds:
rsync -h --progress --stats -r -tgo -p -l -D --update --xattrs
--modify-window=10 --os2-perms U:\ftpserver F:\ftpserver
-h, --human-readable
-r, --recursive recurse into directories
-t, --times preserve modification times
-g, --group preserve group
-o, --owner preserve owner (super-user only)
-p, --perms preserve permissions
-l, --links copy symlinks as symlinks
-D same as --devices --specials
--devices preserve device files (super-user only)
--specials preserve special files
--update skip files that are newer on the receiver
--modify-window=NUM compare mod-times with reduced accuracy
--xattr
--os2-perms
Aha.
I added -vv and see:
ftpd.exe perms differ sender 100644 receiver 100777
If I leave out the -p, no more error. It doesn't transfer the file (as
it should not), but also doesn't complain about Permission denied (13):
[C:\programs\rsync]rsync -h --progress --stats -tgo -l -D --update
--xattrs --os2-perms F:\ftpserver\ftpd.exe U:\ftpserver
[ . . . ]
Number of files: 1
Number of files transferred: 0
So, what is -p (--perms) and why should I use it?
-p, --perms
This option causes the receiving rsync to set the destination
permissions to be the same as the source permissions. (See also
the --chmod option for a way to modify what rsync considers to
be the source permissions.)
When this option is off, permissions are set as follows:
o Existing files (including updated files) retain their
existing permissions, though the --executability option
might change just the execute permission for the file.
o New files get their "normal" permission bits set to the
source file's permissions masked with the receiving
directory's default permissions (either the receiving
process's umask, or the permissions specified via the
destination directory's default ACL), and their special
permission bits disabled except in the case where a new
directory inherits a setgid bit from its parent direc-
tory.
Thus, when --perms and --executability are both disabled,
rsync's behavior is the same as that of other file-copy utili-
ties, such as cp(1) and tar(1).
In summary: to give destination files (both old and new) the
source permissions, use --perms.
Does anybody have any guidance as to the desireability of using --perms
?
--
Regards,
Al S.