namei — permissions at every step of a path
cheat sheet · Ubuntu 24.04 · util-linux 2.39 https://lab.dimsanych.ru/en/wiki/namei/Cheat sheet
-
namei -l /etc/nginx/nginx.conftype, mode, owner of each part -
namei -m /var/www/html/index.htmlmodes only -
namei -o /srv/app/dataowner and group only -
namei /bin/shwhere symbolic links lead -
namei -n /bin/shdon't follow links -
namei -x /home/studentmark mount points (D) -
sudo -u www-data namei -l /srv/site/index.htmlas the service
Options
-l is -m -o -v together; it's usually all you need. Full list — man namei.