Greetings,Just a gues, but try something like 'sudo -c "echo x | tee /tmp/file"'
until recently my system behaves sort of strangely:
$ touch /tmp/file
$ ls -l /tmp/file
-rw------- 1 rainer rainer 0 2022-03-09 19:06 /tmp/file
$ echo x | sudo tee /tmp/file
Password:
tee: /tmp/file: Permission denied
x
$ chmod a+w /tmp/file
$ ls -l /tmp/file
-rw--w--w- 1 rainer rainer 0 2022-03-09 19:06 /tmp/file
$ echo x | sudo tee /tmp/file
tee: /tmp/file: Permission denied
x
$
Since when can't root write to files it doesn't own? And not even,
if
the file has write permission for everybody?
This worked as long as I can think of. My last routine upgrade
install-
ed new kernel package "sys-kernel/gentoo-sources-5.15.26", so I
built
the new kernel and booted from it. May this be the reason?
When I'll have time to reboot, I'll test the above commands on my
old
kernel, 5.15.19. But perhaps there's another reason?
Slightly puzzled
Rainer
Greetings,
until recently my system behaves sort of strangely:
$ touch /tmp/file
$ ls -l /tmp/file
-rw------- 1 rainer rainer 0 2022-03-09 19:06 /tmp/file
$ echo x | sudo tee /tmp/file
Password:
tee: /tmp/file: Permission denied
x
$ chmod a+w /tmp/file
$ ls -l /tmp/file
-rw--w--w- 1 rainer rainer 0 2022-03-09 19:06 /tmp/file
$ echo x | sudo tee /tmp/file
tee: /tmp/file: Permission denied
x
$
Since when can't root write to files it doesn't own? And not even, if
the file has write permission for everybody?
This worked as long as I can think of. My last routine upgrade install-
ed new kernel package "sys-kernel/gentoo-sources-5.15.26", so I built
the new kernel and booted from it. May this be the reason?
When I'll have time to reboot, I'll test the above commands on my old kernel, 5.15.19. But perhaps there's another reason?
Slightly puzzled
Rainer
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 303 |
Nodes: | 16 (2 / 14) |
Uptime: | 73:26:35 |
Calls: | 6,805 |
Calls today: | 1 |
Files: | 12,325 |
Messages: | 5,399,883 |