0

I have a file in a directory with root root permissions. But even with root user I am not able to change the permission or cd to that directory, even not able to change the permissions.

$ 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
gokam
  • 13
  • 7
  • 2
    On what kind of filesystem does AWS reside? Could it be mounted read-only? Do you see relevant kernel messages? – berndbausch May 09 '21 at 04:11
  • 1
    please share the mounted device permissions,Filesystem type and /etc/passwd file info – asmath May 09 '21 at 08:52
  • It's in my home directory , updated my post. No kernel message. root:x:0:0:root:/root:/bin/bash – gokam May 09 '21 at 14:43

0 Answers0