The following commands will be your friends:
The first simply lists all the files in a directory and should be your first port of call when you get a permission denied error. Like below, where I'm trying to change to the /root/ directory logged in as user noroot.
- ls -l directorypath
- getfacl filename
[noroot@Subversion /]$ cd /root/If you have enabled ACLs for the file system, then the issue might be related to the acl, so you could have a look with the second command.
bash: cd: /root/: Permission denied
This is one of them objectives, where you could do with a friend who changes permissions and performs a few naughty actions on your system, e.g. stops a few services, changes SELinux contexts, etc.. and you then have to figure out how to get everything back in working order.
No comments:
Post a Comment