[ale] Ghost SGID on extract?

Bob Toxen transam at VerySecureLinux.com
Wed Jun 30 13:16:24 EDT 2021


Have you tried "tar -tvf foo.tar" to see what the permissions are in
the archive?  That will determine what they are for each created file.

If memory serves tar does not usually change the permissions or ownership
on extraction if the file (or dir, etc.) exist.  This would explain
your experience.

Bob Toxen
bob at verysecurelinux.com               [Please use for email to me]
Retired from Quality Linux & UNIX security and SysAdmin & software
   consulting since 1990.
Retired from Quality spam and virus filters.

"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond where
the shadows lie...and the Eye is everwatching"
-- The Silicon Valley Tarot Henrique Holschuh with ... BobT's enhancement

On Tue, Jun 29, 2021 at 03:23:50PM -0500, Leam Hall via Ale wrote:
> Okay, I've never seen this before.
> 
> 1. tar.gz file built by root, permissions do not include SGID flag on base directories.
> 2. Extract as user, no problem on multiple OS (Linux, Mac) versions.
> 3. Extract as root, some of the directories are SGID.
> 4. Extract the same tar.gz file over the first extraction, and the dirs are no longer SGID.
> 
> What could cause this?
> 
> Leam
> 
> -- 
> Systems Programmer         (reuel.net/resume)
> Scribe: The Domici War     (domiciwar.net)
> General Ne'er-do-well      (github.com/LeamHall)
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


More information about the Ale mailing list