am I missing something, or are permissions always preserved?

Dave Dykstra dwd at
Mon Jan 13 14:56:02 EST 2003

On Sat, Jan 11, 2003 at 11:19:33AM -0800, Ben wrote [off list]:
> On Tue, 2003-01-07 at 14:49, Dave Dykstra wrote:
> > That sounds reasonable to me that rsync shouldn't try to preserve those
> > extra bits without -p.  Try making a patch and seeing if that works.
> > 
> > I don't have Samba set up, but on a vfat filesystem on Linux rsync is
> > doing even worse because after the initial file creation it does a
> > "fchmod(fd, 0600)" which fails and it doesn't even copy files at all.
> > 
> Okay, attached is a patch I just whipped up that seems to work well. It
> adds the --skip-perms flag, which has the effect of making rsync not try
> to set permissions, not even to sane values.

I was not able to read your patch because it seems to have lots of
characters that I can't view on my email reader.  A header on the
attachment says
    X-MIME-Autoconverted: from 8bit to base64 by
so my ISP must have had trouble with it.

Anyway, I wasn't thinking of an option, I was thinking of it doing
something that was the default whenever there was no -p.  I'd rather
avoid adding an option if we can get away with it.  I'm now having second
thoughts about stripping off the setuid/setgid bits by default without
'-p', because that's not what GNU cp does.  I think it would be better if
it just silently ignored errors from chmod and fchmod when -p is not set.

- Dave

More information about the rsync mailing list