File permission umask howto?

Scott Howard scott at doc.net.au
Wed Apr 3 23:45:46 EST 2002


On Wed, Apr 03, 2002 at 10:40:07PM +1000, Scott Howard wrote:
> > We've talked about a --chmod option to modify the permissions in
> > flight, but nobody has written it yet.
> 
> It's written... just needs some cleaning up and further testing...

If anyone's interested, a copy of the (current) patch for this is available
at http://www.docbert.org/outgoing/rsync-chmod-v1.patch

It still needs a little work, but any comments are welcome.

Usage is basically :

rsync -a --chmod ug-s,a+rX /tmp/fred/ /tmp/to/

Numeric modes are not currently supported (ie, --chmod 0755). Although they
would be easy to add, I'm not sure if it's a good idea or not? It really only
make sense if you're only copying single files - as soon as you start copying
directories it's going to get messy trying to use the same modes for
dirs and files.

  Scott




More information about the rsync mailing list