patch against manpage
Paul Slootman
paul at debian.org
Thu Mar 13 00:55:55 EST 2003
On Wed 12 Mar 2003, jw schultz wrote:
> On Wed, Mar 12, 2003 at 01:27:32PM +0100, Paul Slootman wrote:
> > This is a patch against the manpage to clarify what the --perm option
> > does and does not do.
>
> If we are going to embellish this description it would be
> good to make it clear that the behavior of rsync in this
> regard is the same as that of cp.
>
> Most of those complaining about this behavior fail to
> understand it is consistent with cp, scp, rcp et al.
Not quite true, I'm afraid...
$ ls -l /tmp/ps*
-rw-rw-r-- 1 paul paul 1266 Mar 12 14:49 /tmp/ps1
$ cp /tmp/ps1 /tmp/ps2
$ ls -l /tmp/ps*
-rw-rw-r-- 1 paul paul 1266 Mar 12 14:49 /tmp/ps1
-rw-r--r-- 1 paul paul 1266 Mar 12 14:51 /tmp/ps2
Note how the permissions are different! That's because cp pays attention
to the umask. Only with the -p option does cp preserve the permissions,
even if the destination doesn't exist.
$ cp --version
cp (coreutils) 4.5.2
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> If i may suggest...
>
> This option causes rsync to update the permissions
> of existing destination files to be the same as the
> source files. Like other file copy utilities new
> destination files will receive the same permissions
> as their source files.
Here it's still not clear that the behaviour with new files is the same
whether or not the option is specified; that was the original problem.
I still think the wording I first used is clearer; if necessary a
sentence could be added that the behaviour is the same as other file
copy utilities, but I'd be careful about that as I have demonstrated
it's not always true, and we also have no idea what file copy utilities
the users are accustomed to...
Paul Slootman
More information about the rsync
mailing list