Tool to show permissions of path in Linux?
Solution 1:
You want namei
.
# namei -l /var/log/nginx/error.log
f: /var/log/nginx/error.log
drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root log
drwx------ nginx nginx nginx
-rw-r--r-- nginx nginx error.log
Note that this command is Linux-specific and may not exist on other operating systems. Also do not confuse it with the namei()
system call.