真的root, 放狗找到答案了:
https://unix.stackexchange.com/questions/503111/group-permissions-for-root-not-working-in-tmp
The behavior you are showing seems to depend on the fs.protected_regular Linux kernel parameter, introduced along with fs.protected_fifos by this commit (converged in version 4.19, I believe), with the aim to fix security vulnerabilities.
Excerpt of the commit message (emphasis mine):
namei: allow restricted O_CREAT of FIFOs and regular files
Disallows open of FIFOs or regular files not owned by the user in world writable sticky directories, unless the owner is the same as that of the directory or the file is opened without the O_CREAT flag. The purpose is to make data spoofing attacks harder. ...
# sysctl fs.protected_regular=0
fs.protected_regular = 0
# echo bbb >> /tmp/file
# cat /tmp/file
aaa
bbb
那个debian 10是4.19内核, 但是:
# sysctl fs.protected_regular
fs.protected_regular = 0
【 在 Dazzy 的大作中提到: 】
: 你这个,不是fakeroot吧?root做系统自毁操作都可以的。
:
: #发自zSMTH-v-@Redmi Note 7
--
修改:dajun FROM 119.114.253.*
FROM 119.114.253.*