>-----Original Message-----
>From: Neil Bothwick <n...@digimed.co.uk> 
>Sent: Friday, March 11, 2022 6:59 AM
>To: gentoo-user@lists.gentoo.org
>Subject: Re: [gentoo-user] Re: Root can't write to files owned by others?
>
>On Fri, 11 Mar 2022 12:38:48 +0100, Dr Rainer Woitok wrote:
>
>> No.   My "/tmp/" directory  is not mounted at all,  it is just a genuine
>> directory in "/".   And that root CAN overwrite a file it doesn't own in
>> other directories, is due to most directories  not having the sticky 
>> bit set  (which is a  (wanted) particularity  of "/tmp/" and 
>> "/var/tmp/", in that it prevents normal users from (re)moving other people's 
>> files):
>
>It's not the sticky bit per se from what I've read, but the new default 
>prevents root from overwriting a file if the file and the directory containing 
>it have different owners. In most cases, the file has the same directory as 
>the owner so this does not happen, but the sticky bit allows users that don't 
>own the directory to create files in it.
>
I was just looking at the patch.  In at least one of its modes I think it's 
specifically looking for the sticky bit on the directory.  I didn't think to 
pay attention to what the new default setting ends up doing for which specific 
mode it goes with.

LMP

Reply via email to