Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Root can't write to files owned by others?
Date: Fri, 11 Mar 2022 14:59:04
Message-Id: 20220311145850.2a4890c4@digimed.co.uk
In Reply to: Re: [gentoo-user] Re: Root can't write to files owned by others? by Dr Rainer Woitok
1 On Fri, 11 Mar 2022 12:38:48 +0100, Dr Rainer Woitok wrote:
2
3 > No. My "/tmp/" directory is not mounted at all, it is just a genuine
4 > directory in "/". And that root CAN overwrite a file it doesn't own in
5 > other directories, is due to most directories not having the sticky bit
6 > set (which is a (wanted) particularity of "/tmp/" and "/var/tmp/", in
7 > that it prevents normal users from (re)moving other people's files):
8
9 It's not the sticky bit per se from what I've read, but the new default
10 prevents root from overwriting a file if the file and the directory
11 containing it have different owners. In most cases, the file has the same
12 directory as the owner so this does not happen, but the sticky bit allows
13 users that don't own the directory to create files in it.
14
15
16 --
17 Neil Bothwick
18
19 Assassins do it from behind.

Replies

Subject Author
Re: [gentoo-user] Re: Root can't write to files owned by others? Mark Knecht <markknecht@×××××.com>
RE: [gentoo-user] Re: Root can't write to files owned by others? Laurence Perkins <lperkins@×××××××.net>