Cannot delete directory and its content: Permission Denied (CentOS 6.10)
by Lucas Rey from LinuxQuestions.org on (#51ZM1)
Hello community,
I'm getting crazy with CentOS 6.10 and with a directory where I got Permission Denied if I try to delete it, change permission, or delete a file inside it:
Code:# sudo rm -rf modules
rm: cannot remove `modules/show.full.php': Permission denied
rm: cannot remove `modules/subscribed.php': Permission denied
rm: cannot remove `modules/pm.php': Permission denied
rm: cannot remove `modules/favorites.php': Permission deniedI'm logged as root, and the directory and the file inside it is owned by a specific user:
Code:ls -l
total 4
drwxr-xr-x 5 evolution evolution 4096 Dec 11 18:45 modulesI can moove the whole directory modules to other place, by I can't delete it or change permission/owner:
Code:# chown root:root modules
chown: changing ownership of `modules': Operation not permitted
# chmod 777 modules
chmod: changing permissions of `modules': Operation not permittedCould someone help me to understand what happen? This is the first time I see such kind of behaviour
Thank you
Lucas


I'm getting crazy with CentOS 6.10 and with a directory where I got Permission Denied if I try to delete it, change permission, or delete a file inside it:
Code:# sudo rm -rf modules
rm: cannot remove `modules/show.full.php': Permission denied
rm: cannot remove `modules/subscribed.php': Permission denied
rm: cannot remove `modules/pm.php': Permission denied
rm: cannot remove `modules/favorites.php': Permission deniedI'm logged as root, and the directory and the file inside it is owned by a specific user:
Code:ls -l
total 4
drwxr-xr-x 5 evolution evolution 4096 Dec 11 18:45 modulesI can moove the whole directory modules to other place, by I can't delete it or change permission/owner:
Code:# chown root:root modules
chown: changing ownership of `modules': Operation not permitted
# chmod 777 modules
chmod: changing permissions of `modules': Operation not permittedCould someone help me to understand what happen? This is the first time I see such kind of behaviour
Thank you
Lucas