umask for rsync

Dave Dykstra dwd at drdykstra.us
Thu Jan 16 21:13:01 EST 2003


In that case it looks like you want the proposed --chmod option discussed at
    http://lists.samba.org/pipermail/rsync/2002-March/006477.html
and
    http://lists.samba.org/pipermail/rsync/2003-January/009298.html

Once it is a command line option it could easily be made into a 
per-module option as well.

- Dave

On Thu, Jan 16, 2003 at 01:45:50PM -0500, Aaron Morris wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I suppose if you wanted a hack, that would work.  I was really looking
> at something that could be used on a per module basis in rsyncd.conf or
> on the command line.  A commercial rsync competitor, TeamSite
> OpenDeploy, has a file mode and a dir mode option.  Even Samba has a
> file and dir mode option on a per "module" (or share) basis.  I was a
> little suprised that rsync did not have a similar option when it has the
> user/group option.
> 
> Perhaps I should have said a file mask and directory mask instead of
> UMASK.  My primary use of rsync right now is the deployment of web
> content from development machines to production machines.  I do not
> always have control of the content or when it is deployed, but the
> file/dir mask option would be a nice security feature.  Tt would keep
> people from deploying files as 666 or directories as 777.
> 
> Here is an example of how it could be useful.
> A few months ago, I started having problems with file modes when
> transferring with rsync (AIX 4.3.3, rsync 2.5.4, rsync --daemon from
> inetd).  All of the sudden, rsync would deploy files as 640 instead of
> 644 like it was doing the day before.  The default umask on the box had
> been changed to 027 several months before this point, but rsync had been
> deploying files as if the umask was still 022.  Come to find out, the
> box had been rebooted the night before; inetd was never restarted when
> the umask was changed (and usually is never restarted) and was still
> operating with a umask of 022.
> 
> Dave Dykstra wrote:
> | On Wed, Jan 15, 2003 at 02:01:30AM -0500, Aaron Morris wrote:
> |
> |>I have another small feature suggestion, it should not cause such a stir
> |>as the whole "file list" issue (I kind of wish I never said anything
> |>about it :) ).
> |>
> |>What about adding a "UMASK" setting to rsync (for use on the command
> |>line and/or perhaps rsyncd.conf)?  I realize that it may be a
> |>problem/conflict with -p, but I think it could be a useful feature.
> |
> |
> | In what way would it be different than making a 2-line script
> |     umask NNN
> |     rsync "$@"
> | ?
> |
> | - Dave
> |
> 
> - --
> Aaron W Morris
> decep
> PGP Key ID:  259978D1



More information about the rsync mailing list