chmod 或 cd 到目录不起作用

chmod 或 cd 到目录不起作用

我有一个文件位于具有 root 权限的目录中。但即使使用 root 用户,我也无法更改权限或 cd 到该目录,甚至无法更改权限。

$ lsattr AWS/
$ sudo lsattr AWS/
$

$ sudo chmod 777 AWS/
chmod: changing permissions of 'AWS/': Operation not permitted

$ stat AWS/
  File: 'AWS/'
  Size: 4096        Blocks: 8          IO Block: 32768  directory
Device: 30h/48d Inode: 111260170   Links: 4
Access: (0750/drwxr-x---)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-03-15 12:13:55.519597000 -0700
Modify: 2021-03-15 12:13:36.914649000 -0700
Change: 2021-03-15 12:13:36.914649000 -0700
 Birth: -
$ sudo su - root
root@host00:/home/kam# chmod 700 AWS/
chmod: changing permissions of 'AWS/': Operation not permitted
root@host00:/home/kam# chmod -R a+x AWS/
chmod: changing permissions of 'AWS/': Operation not permitted
chmod: cannot read directory 'AWS/': Permission denied
root@host00:/home/kam# chmod -R a+X AWS/
chmod: changing permissions of 'AWS/': Operation not permitted
chmod: cannot read directory 'AWS/': Permission denied
root@host00:/home/kam# ls -l AWS/
ls: cannot open directory 'AWS/': Permission denied
root@host00:/home/kam# ls -ld AWS/
drwxr-x--- 4 root root 4096 Mar 15 12:13 AWS/
root@host00:/home/kam# exit
exit

root@host00:/home/kam# cd AWS/
-su: cd: AWS/: Permission denied
root@host00:/home/kam#
$ ls -ld AWS/
drwxr-x--- 4 root root 4096 Mar 15 12:13 AWS/
$ pwd
/home/kam

相关内容