I have following directory (/usr/local
)
rwxr-xr-x. 43 root root 4096 Jul 25 14:19 .
rwxr-xr-x. 14 root root 4096 Feb 21 10:27 ..
rwxr-xr-x. 2 root root 4096 Jun 28 2011 bin
[...]
rwxr-xr-x 1 root root 8192 Jul 25 13:41 bad_dir
rwxr-xr-x. 4 root root 4096 Mar 28 11:56 good_dir
I am logged as root. When I run chown root:root good_dir
everything is ok, but when I run chown root:root bad_dir
I got chown: changing ownership of '/usr/local/bad_dir': Permission denied
What is wrong with bad_dir? What should I change to make chown
working correctly?
I see a dot in the end of permissions, but I don't know what does it mean.
Update
Running
echo 0 > /selinux/enforce
chmod 755 bad_dir
gives also chmod: changing permissions of 'bad_dir': Permission denied
Update 2
Output of ls -la /usr
is
total 128
drwxr-xr-x. 14 root root 4096 Feb 21 10:27 .
dr-xr-xr-x. 24 root root 4096 May 28 08:22 ..
dr-xr-xr-x. 2 root root 28672 Jun 27 10:29 bin
drwxr-xr-x. 2 root root 4096 Jun 28 2011 etc
drwxr-xr-x. 2 root root 4096 Jun 28 2011 games
drwxr-xr-x. 36 root root 4096 Jul 23 14:04 include
dr-xr-xr-x. 12 root root 4096 Apr 11 17:10 lib
dr-xr-xr-x. 45 root root 36864 Jul 23 14:04 lib64
drwxr-xr-x. 14 root root 4096 Mar 28 11:58 libexec
drwxr-xr-x. 43 root root 4096 Jul 25 14:34 local
drwxr-xr-x. 3 root root 4096 Feb 21 10:27 man
dr-xr-xr-x. 2 root root 12288 Jul 23 14:04 sbin
drwxr-xr-x. 106 root root 4096 Mar 28 12:00 share
drwxr-xr-x. 4 root root 4096 Nov 20 2013 src
lrwxrwxrwx. 1 root root 10 Nov 20 2013 tmp -> ../var/tmp
ls -la /usr
? – Ramesh Jul 25 '14 at 12:39ls -la /usr/local
? – Ramesh Jul 25 '14 at 12:42lsattr /-d usr/local/bad_dir
– Cristian Ciupitu Jul 25 '14 at 12:48lsattr: Inappropriate ioctl for device While reading flags
– Piotr Stapp Jul 25 '14 at 12:50stat --format='%D' /usr/local /usr/local/bad_dir
– Cristian Ciupitu Jul 25 '14 at 13:11df -hP /usr/local/bad_dir
– Bratchley Jul 25 '14 at 18:06