strip setuid/setgid bits on backup (was Re: small security-related rsync extension)

Adrian Ho aho-sw-rsync at
Mon Jul 8 06:19:02 EST 2002

On Mon, Jul 08, 2002 at 03:52:16AM -0700, jw schultz wrote:
> However, if it lists created, modified and deleted files it will need
> to differentiate.  It should instead list the files and the action.

Well, yeah, that's probably more useful in general.  8-)

> Also the path should not be fully qualified but instead should match
> that of the commandline with cwd the same as the rsync launch.

If the sender's/receiver's cwd is guaranteed to be the root of the
corresponding rsync'd hierarchies, then yes, relative paths would

> <example>
> UPDATE	foo/
> CREATE	foo/bar1
> UPDATE	foo/oldie
> DELETE	foo/gonzo
> HLINK	foo/gorgon
> SLINK	foo/plank
> SPECIAL	foo/sock1
> </example>

I like the format.

BTW, does the current protocol reflect the receiver's disposition of
each target back to the sender?  If not, I would certainly like to see
that added to the protocol, so that the post-send script can also take
some well-informed actions.

> Unlike the previous example this wouldn't emit hundreds of
> error messages about deleted files.

I was hoping no one would notice.  8-)

> For some uses this output would actually be an improvement on the
> logging so it might be nice to be able to direct it into a file without
> spawning a process.

Well, folding it into the log would probably be sufficient, methinks.

- Adrian

More information about the rsync mailing list