[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Re: Permissions in tar archives

From: Paul Eggert
Subject: Re: [Bug-tar] Re: Permissions in tar archives
Date: Mon, 18 Jul 2005 09:17:15 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Matt McCutchen <address@hidden> writes:

> Let me ask for another change to tar: let the "--mode" option specify
> permissions for extracted files.

This is a good suggestion, one I've heard before.

> "--mode" can be given zero or more comma-separated chmod(1)-style
> commands followed by either "umask" or "verbatim".

I like the first idea, but the "umask"/"verbatim" thing should be a
separate option.  This is to maintain consistency with other GNU
utilities like mkdir and install, which use --mode with the same
meaning as chmod.

> It would be nice to also support "--owner" and "--group" options for
> extraction, with the empty string or "same" indicating the owner or
> group in the archive and "me" indicating the extractor.  (Do we have
> to worry about real users called "me" and "same"?

Yes.  I suggest using "/" to denote the owner or group in the archive,
and the empty string to denote the owner or group of the extractor.
This would be a pure extension to chmod's operand.  Also, we can
follow chmod's lead and use : to separate the owner from the group, so
that we don't need the --group option any more.  E.g.,

       --owner=matt      Extract as owner matt.
       --owner=matt:sys  Extract as owner matt, group sys
       --owner=/:/       The default: extract owner/group from tar file.
       --owner=:         Same as --no-same-owner --no-same-group

(Of course, someone would need to implement all this.  :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]