file permissions - the best way?

tim.conway at tim.conway at
Thu Dec 13 02:46:25 EST 2001

in the remote system rsyncd.conf, for the module in question
"uid = useryouwant"
on your client machine command line"
"rsync -a localdir remote:module"
Make sure you have the permissions set right on the client before you send 
it.  cygwin doesn't support arbitrary permissions, but rather checks the 
extension and file content.
tconway at FLATUSWIN ~/c/tmp
$ cat script

tconway at FLATUSWIN ~/c/tmp
$ ls -l script
-rwxr-xr-x   1 tconway  None           10 Dec 12 08:43 script

tconway at FLATUSWIN ~/c/tmp
$ true >script

tconway at FLATUSWIN ~/c/tmp
$ ls -l script
-rw-r--r--   1 tconway  None            0 Dec 12 08:44 script

tconway at FLATUSWIN ~/c/tmp
creepy, huh?  no wonder a 'ls -l' takes so long. 
As you see, it treats executables, by default, as 755, which is what you 
need. If you've got files that cygwin won't see as executable, they'll 
sync over as 644 instead of 755.
There's no option on rsync to execute external commands, aside from the 
implicit invocation of an external transport, when that's used.
rsync is a file transfer system.  If you need a remote shell,  I suggest 
telnet, rsh, or ssh.

Tim Conway
tim.conway at
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
".\n" '
"There are some who call me.... Tim?"

Dan Gardner <Dan.Gardner at>
Sent by: rsync-admin at
12/12/2001 04:12 AM

        To:     "'rsync at'" <rsync at>
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        file permissions - the best way?

I'm interested in the *best* way to set particular permissions on the
machine I am rsync'ing content to.

These are the specifics of our setup:
1                client pushes to remote
2                remote machine = AIX running rsync daemon as chroot
3                client machine = NT running CYGWIN
4                directory tree on client has many files/directories with 
differnt permissions/owners etc.
5                We wish ALL the files/directories to be put on the remote 
with particular permissions/owner (The same permissions and owner for

We currently do this with an "rsync -rt ..." then chmod as a cron job to 
the correct permissions  "775".

Any ideas on how to eliminate the cron/chmod job would be very welcome,
thanks for your time.

Dan Gardner
Producer MCN online

More information about the rsync mailing list