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. - Dave On Wed, Jan 01, 2003 at 02:24:36PM -0800, Ben wrote: > I'm not sure what POSIX calls for, but on both Linux and AIX (the two > unix OSes I have access to) I can leave off the mode arg when calling > open(2). Granted, doing so gives me a mode that normally isn't so good, > but in my case this would be fine, as I have samba forcing modes to be > what I want them to be. > > However, after looking into this more, it turns out that samba > apparently causes chmod(2) to fail _only_ when trying to set modes > S_ISUID, S_ISGID, or S_ISVTX. Trying to set these modes in open(2), or > trying to set any other modes in open(2) or chmod(2), silently fails > without raising an error. > > So while this might well be a samba problem, it could be avoided if > rsync behaved as I would expect it to. The original files do indeed have > S_ISGUID set on them, but I don't see why rsync should try to preserve > this if I didn't tell it to preserve permissions. > > > On Wed, 2003-01-01 at 07:13, Green, Paul wrote: > > Ben [mailto:[EMAIL PROTECTED]] > > > > > I'm relatively new to rsync, but it seems to me that if there's an > > > option to perserve permissions and you don't set it, then rsync > > > shouldn't do anything with permissions. > > > > Sounds good, but recall how POSIX / Unix system calls work. To create a > > file, you have to specify what mode (permission) it should have. There is > > no way to tell creat() or open() to "do the default thing." > > > > I think a case could be made that this is a defect / incompatibility in the > > underlying file system layer that issues complaints about permissions. > > Before I attempted to code any kind of a fix, I'd sure want to read the > > specs of this layer and understand how the designers thought this problem > > should be approached. > > > > Thanks > > PG -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html