Changing windows file permsissions

Dean Erling dean at
Thu Oct 23 20:00:48 GMT 2008

I just realized I pasted the wrong command line.  I am not using the -av
option.  I took that out a while ago.

C:\Downloads\rsync\rsync.exe -i --password-file= C:\Backend\rsync
\password.txt ssclient at

If I want to add --chmod=ugo=rwX, is the following correct?

C:\Downloads\rsync\rsync.exe -i --password-file= C:\Backend\rsync
\password.txt ssclient at
/Backend/VendorFiles/ --chmod=ugo=rwX

-----Original Message-----
From: Matt McCutchen [mailto:matt at] 
Sent: Thursday, October 23, 2008 12:36 PM
To: Dean Erling
Cc: rsync at
Subject: Re: Changing windows file permsissions

On Thu, 2008-10-23 at 11:41 -0700, Dean Erling wrote:
> C:\Downloads\rsync\rsync.exe -i
> --password-file=C:\Backend\rsync\password.txt -av
> ssclient at /Backend/VendorFiles/
> When the download completes the downloaded file is read only and
> are set so that the service account that needs that file has deny read
> access.

> I'm stumped!  Anyone have any ideas as to why the file permissions would
> changing?  Any ideas on how to make it not change permissions?

You are passing -a, which includes -p, which tells rsync to preserve
permissions.  You can override this by passing --no-p to the right of -a
on the command line.  You may additionally need --chmod=ugo=rwX to allow
permissions to increase from source to destination.

IMO, too many of the rsync examples in the man page and on the Internet
promote -a as a one-size-fits-all option.  I use the "adopt destination
permissions and ownership but preserve everything else" combination,
-rltE --chmod=ugo=rwX, much more often; I think it should be similarly


More information about the rsync mailing list