Paul Eggert wrote:
On 12/14/2017 12:03 PM, Bruce Dubbs wrote:
Is there any reason that tar should change the permissions or ownership
of the . directory if it is present in a tarball?

Yes, as that's what tar has done "forever" and quite possibly some people
depend on it. It might be a good idea to omit extraction of "." unless
some new option is specified.

Just because it's always been done that way does not make it right. To my mind extracting . can never create a directory. It is already present by definition. At most it could change permissions and then only if the user owned the directory (or was root). I suppose it could also change the directory owner/group if the effective user was root.

To my mind it would be totally unexpected by most users.

I would not think it is a normal use of tar. Specifying * instead of . when creating would be better but may not include hidden files/directories.

Perhaps a new option --preserve-directory-permissions would be reasonable. It would apply to any existing directory upon extraction.

  -- Bruce


Reply via email to