On Sun 01 Oct 2006, Marc Lehmann wrote:
>
> rsync copies permissions even when -p has not been specified, e.g.:
>
> # touch a
> # chmod 137 a
> # umask 022
> # ls -la
> ---x-wxrwx 1 root root 0 Oct 1 00:59 a
> # rsync -rt a b
> # ls -l
> ---x-wxrwx 1 root root 0 Oct 1 00:59 a
> ---x--xr-x 1 root root 0 Oct 1 00:59 b
>
> b should have permissions 755, not 015, as -p was not specified.
s/015/115/
Actually, this is correct.
It would have been 137 if -p had been specified. You didn't specify -p,
so you didn't want the permissions preserved, which weren't.
As described in the manpage:
o New files get their "normal" permission bits set to the
source file's permissions masked with the receiving end's
umask setting, and their special permission bits disabled
except in the case where a new directory inherits a set-
gid bit from its parent directory.
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).
Note the "umask" in the text.
You demonstrate that it works exactly as documented....
Comments?
Paul Slootman
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]