For example, listing of the file permission of the folders and file of SSH private key.
$ namei -l ~/.ssh/id_rsa
f: /home/ang/.ssh/id_rsa
drwxr-xr-x root root /
drwxr-xr-x root root home
drwx------ ang ang ang
drwx------ ang ang .ssh
-rw------- ang ang id_rsa
First, let's create a sample symlink.
$ sudo ln -s /tmp /var/www/html/tmp
Tracing to the endpoint of the symlink.
$ namei /var/www/html/tmp
f: /var/www/html/tmp
d /
d var
d www
d html
l tmp -> /tmp
d /
d tmp
Similarly, but showing the permissions of each component of the resolved full path.
$ namei -l /var/www/html/tmp
f: /var/www/html/tmp
drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root www
drwxr-xr-x root root html
lrwxrwxrwx root root tmp -> /tmp
drwxr-xr-x root root /
drwxrwxrwt root root tmp
No comments:
Post a Comment