Gentoo Archives: gentoo-user

From: Laurence Perkins <lperkins@×××××××.net>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: RE: [gentoo-user] Re: Root can't write to files owned by others?
Date: Thu, 10 Mar 2022 17:20:05
Message-Id: DM5PR07MB4055646AA57EF70E72FE1CB6D20B9@DM5PR07MB4055.namprd07.prod.outlook.com
In Reply to: [gentoo-user] Re: Root can't write to files owned by others? by Nikos Chantziaras
1 >On 09/03/2022 20:28, Dr Rainer Woitok wrote:
2 >> until recently my system behaves sort of strangely:
3 >>
4 >> $ echo x | sudo tee /tmp/file
5 >> Password:
6 >> tee: /tmp/file: Permission denied
7 >> [...]
8 >>
9 >> Since when can't root write to files it doesn't own? And not even, if
10 >> the file has write permission for everybody?
11 >
12 >This is normal, at least when using systemd. To disable this behavior, you have to set:
13 >
14 > sysctl fs.protected_regular=0
15 >
16 >But you should know what this means when it comes to security. See:
17 >
18 > https://www.spinics.net/lists/fedora-devel/msg252452.html
19 >
20 >
21
22 And they chose to have systemd set that instead of putting it in sysctl.conf or the default kernel settings where it belongs? Good grief!
23
24 I guess if you're going to use systemd you need to subscribe to the Fedora mailing lists so you get at least a little notice before they break things.
25
26 LMP