Skip to content

Instantly share code, notes, and snippets.

@chris-kobrzak
Last active April 14, 2021 11:47
Show Gist options
  • Save chris-kobrzak/c920dc3c5968e3fe83867f8b8319e532 to your computer and use it in GitHub Desktop.
Save chris-kobrzak/c920dc3c5968e3fe83867f8b8319e532 to your computer and use it in GitHub Desktop.
Display all permissions on a path and its parents on Linux
namei -om /path/to/a/dir-or-file
# Sample output
#
# f: /usr/local/bin/nginx_modsite
# drwxr-xr-x root root /
# drwxr-xr-x root root usr
# drwxr-xr-x root root local
# drwxr-xr-x root root bin
# -rwxr-xr-x root root nginx_modsite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment