[ale] Ghost SGID on extract?
Leam Hall
leamhall at gmail.com
Fri Jul 2 09:19:59 EDT 2021
Sorry for the late response, it's been a busy few days.
Yup, already checked the tar file, it has the SGID set. I understand why a user's untar would remove the permissions, otherwise they could add a root SGID file to the system. However, I'm not sure why the second untar by root removes it.
Leam
On 6/30/21 12:16 PM, Bob Toxen wrote:
> 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
--
Systems Programmer (reuel.net/resume)
Scribe: The Domici War (domiciwar.net)
General Ne'er-do-well (github.com/LeamHall)
More information about the Ale
mailing list