ls -ld /tmp
drwxrwxrwt 17 root root 440 Feb 3 11:18 /tmp
user1@debian:/tmp$ touch acltest0
user1@debian:/tmp$ ls -l acltest0
-rw-rw-r-- 1 user1 user1 0 Feb 3 11:22 acltest0
user1@debian:/tmp$ getfacl -c acltest0
user::rw-
group::rw-
other::r--
user1@debian:/tmp$ setfacl -m u:user100:rw acltest0
user1@debian:/tmp$ getfacl -c acltest0
user::rw-
user:user100:rw-
group::rw-
mask::rw-
other::r--
到目前为止一切顺利...但是:
user100@debian:/tmp$ echo 'edit from user100' >> acltest0
bash: acltest0: Permission denied
好的,我试试:
vi acltest0
[...]
edit from user100
然后
:wq
"acltest0"
E212: Can't open file for writing: permission denied
Press ENTER or type command to continue
好的,我试试:
:w!
我收到了同样的错误信息。
为什么会出现这样的错误信息?
附加信息:
root@debian:/tmp# cat /etc/debian_version
12.2
root@debian:/tmp# uname -a
Linux debian 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
谢谢大家!