Gentoo Archives: gentoo-user

From: Dr Rainer Woitok <rainer.woitok@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Root can't write to files owned by others?
Date: Wed, 09 Mar 2022 18:29:02
Message-Id: 25128.61921.911302.682293@tux.local
1 Greetings,
2
3 until recently my system behaves sort of strangely:
4
5 $ touch /tmp/file
6 $ ls -l /tmp/file
7 -rw------- 1 rainer rainer 0 2022-03-09 19:06 /tmp/file
8 $ echo x | sudo tee /tmp/file
9 Password:
10 tee: /tmp/file: Permission denied
11 x
12 $ chmod a+w /tmp/file
13 $ ls -l /tmp/file
14 -rw--w--w- 1 rainer rainer 0 2022-03-09 19:06 /tmp/file
15 $ echo x | sudo tee /tmp/file
16 tee: /tmp/file: Permission denied
17 x
18 $
19
20 Since when can't root write to files it doesn't own? And not even, if
21 the file has write permission for everybody?
22
23 This worked as long as I can think of. My last routine upgrade install-
24 ed new kernel package "sys-kernel/gentoo-sources-5.15.26", so I built
25 the new kernel and booted from it. May this be the reason?
26
27 When I'll have time to reboot, I'll test the above commands on my old
28 kernel, 5.15.19. But perhaps there's another reason?
29
30 Slightly puzzled
31 Rainer

Replies

Subject Author
Re: [gentoo-user] Root can't write to files owned by others? Jack <ostroffjh@×××××××××××××××××.net>
Re: [gentoo-user] Root can't write to files owned by others? "Peter Böhm" <peter.bo@×××.de>
[gentoo-user] Re: Root can't write to files owned by others? Nikos Chantziaras <realnc@×××××.com>