Setting the File/Folder chmod bits - Wish List ?
Leigh Dodd
l.s.dodd at itri.brighton.ac.uk
Tue Nov 19 14:33:04 EST 2002
On Mon, Nov 18, 2002 at 11:20:17AM -0000, Leigh Dodd wrote:
>> Is it possible to set the u-g-o bits in a Rsync ?
>>
>> What I want to do is synce files from one machine to another (public
web
>> machine) so that all the files are READ-ONLY and, of course, the sub
>> folders READ+EXECUTE-ONLY.
>>
>> Can't find any command line options or rsync.conf settings.
>>
>> Would be nice to have a --chmod-file=xxxx and a --chmod-folder=xxxx
>> option, and with the same type of function in the conf file.
>I think something like this has come up before. As it is
>you can either bracket the rsync with chmod of the source
>or you can chmod -R a-w destination afterwards. To confirm,
>i tried playing with umask and a umask of 222 prevented the
>transfer.
>
>If you choose to chmod the destination i'd suggest not using
>the -p or -a options.
>
>PS. In POSIX filesystems we don't have folders. We have
>directories. And the difference matters :)
Had a play with the chmod -R a-w and it causes all the files to be
Read only but, since I'm using a non-root (sync) account to ssh transfer
the files,
(Paranoid or what :-o.)the next time I try to rsync, the non-root
account
can't write to the files, of course. Same as your umask 222
Without the -a or -p -o options I get a default rwx,r-x,r-x permissions,
(Umask 022)
owned by the sync account, which I can work with but all the files are
world executable.
chmod -R go-x would work fine on the files but would stop access to the
sub directories :-) just like umask 033
So one way stops the next rsync from working and the second stops access
to dir's
I don't want to rsync using root.
Still think the easiest way would be to have two options (file + dir
chmod's),
Can I have them added to the wish list please ?
Leigh
More information about the rsync
mailing list