randymorris / shop

Show permissions at every level of a given path

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shop: A tool to show permissions at every level in a path.

shop is a simple bash script that tries to be the compliment of tree. tree starts at a trunk and shows all paths that originate from that trunk, optionally showing permissions. Conversely, shop starts at a leaf and shows the permissions back to a trunk. This is very useful when battling permissions issues with web servers or shared directories, for instance.

Installation:

  • Arch Linux - clone the repo and run makepkg -i in the root directory
  • Others - Drop shop somewhere in your $PATH

Usage:

Usage: shop [-L N] [-o] [-p N] [-t PATH] [PATH1..]

Options:
  -L N, --level N         traverse N levels up the tree
  -o, --octal             show octal mode instead of human readable mode
  -p N, --pad N           allow USER:GROUP N characters before path name
                            - default: 17 (8 character user and group)
  -t PATH, --trunk PATH   only traverse up to PATH instead of / (root)
                            - takes precedence over --level

  -h, --help              show this help message
  --version               show version info

Example output:

~ >>> shop /tmp/screens/S-randy
drwxr-xr-x root:root       /
drwxrwxrwt root:root       /tmp
drwxr-xr-x root:users      /tmp/screens
drwx------ randy:users     /tmp/screens/S-randy
~ >>>

~ >>> shop -L 2 -o /tmp/screens/S-randy
1777 root:root       /tmp
0755 root:users      /tmp/screens
0700 randy:users     /tmp/screens/S-randy
~ >>>

If you know of any alternative, please let me know.

About

Show permissions at every level of a given path


Languages

Language:Shell 100.0%