Re: tar preserves setuid bit

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

 



Imran Ghory <imranghory@xxxxxxxxx> wrote:
> If running as the root user tar restores the original permissions to
> extracted files, this includes the setuid bit. No warning is given to
> the user that this has happened.

>From the default man page for tar:

    The owner, modification time, and mode are restored (if possible);

This isn't specific to GNU, it's *expected behaviour* for every version of tar.
 In fact, a failure to conform to this behaviour breaks essential functionality
of tar.  If the root user doesn't know what this tool does or what it's for,
then don't run it.

What part of 'Tape ARchive' wasn't clear?  Would you be happy if your backup and
restore procedures failed to actually restore files in their original condition?
 Sheesh.
-- 
Neil (mckellar@xxxxxxxxxxxxxxx)


[Index of Archives]     [Linux Security]     [Netfilter]     [PHP]     [Yosemite News]     [Linux Kernel]

  Powered by Linux