10
3
Sometimes it is necessary to determine on which directory in a path access rights are limited. Here is an example:
$ ls /sys/kernel/debug/usb/devices
ls: cannot access /sys/kernel/debug/usb/devices: Permission denied
$ cat /sys/kernel/debug/usb/devices
cat: /sys/kernel/debug/usb/devices: Permission denied
Neither ls
nor cat
shows where the user rights were limited.
What is the simplest way of showing the access rights for every component (directory and the file) in the path? I am mainly interested in solutions for Unix-like systems.