从 Ubuntu v14.04 升级到 v16.04 后,chown 似乎在我的服务器上不再起作用。我检查了以下内容:
- 文件系统是 RW
- 用户已存在
- 文件夹不是不可变的
- 所有命令均以 root 身份执行
我尝试了以下操作(以 root 身份):
$ id
uid=0(root) gid=0(root) groups=0(root)
$ apparmor_status
apparmor module is loaded.
0 profiles are loaded.
0 profiles are in enforce mode.
0 profiles are in complain mode.
0 processes have profiles defined.
0 processes are in enforce mode.
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
$ cd /
$ > test.txt
$ chmod 777 test.txt
$ lsattr test.txt
-------------e-- test.txt
$ ls -l test.txt
-rwxrwxrwx 1 root root 0 Jun 27 19:01 test.txt
$ chown www-data test.txt
chown: changing ownership of 'test.txt': Operation not permitted
有人有什么建议吗?