am I missing something, or are permissions always preserved?
Dave Dykstra
dwd at drdykstra.us
Tue Dec 31 16:00:01 EST 2002
What do you mean, "altered"? Do the destination files already exist?
It is supposed to preserve existing permissions on destination files
when you don't use -p.
- Dave
On Mon, Dec 30, 2002 at 06:44:24PM -0800, Ben wrote:
> Hmmm... while that makes sense, that doesn't really help me in my
> situation, where permissions cannot be altered because of the network
> mount they are being written to.
>
> Does it make sense to impliment a "don't touch permissions" flag?
>
> On Tue, 2002-12-24 at 05:08, Dave Dykstra wrote:
> > When preserve_perms is not set, rsync sets a default permission based on
> > the original permissions and the umask. A comment in flist.c says that is
> > what GNU cp does, so that's why rsync does it. Comments in generator.c
> > and receiver.c indicate that if a file already exists and preserve_perms
> > isn't set, the original permissions should be preserved.
> >
> > - Dave
> >
> > On Sat, Dec 21, 2002 at 12:30:55PM -0800, Ben wrote:
> > > They seem to be for me, even when I don't pass in the --perms flag. This
> > > is a problem because I'm rsyncing to a samba mount with fixed
> > > permissions.
> > >
> > > Looking at rsync.c (for version 2.5.5) starting at line 204, I see this
> > > code snippet:
> > >
> > > #ifdef HAVE_CHMOD
> > > if (!S_ISLNK(st->st_mode)) {
> > > if (st->st_mode != file->mode) {
> > > updated = 1;
> > > if (do_chmod(fname,file->mode) != 0) {
> > > rprintf(FERROR,"failed to set permissions on %s : %s\n",
> > > fname,strerror(errno));
> > > return 0;
> > > }
> > > }
> > > }
> > > #endif
> > >
> > > I would have expected to see a test for the setting of perserve_perms,
> > > but it's not there. Is this a bug or is there there a reason
> > > perserve_perms isn't checked?
More information about the rsync
mailing list