This may be a dumb question, but how does symbolic link preserve permission?
$ls -ld /proc/1/exe
ls: cannot read symbolic link '/proc/1/exe': Permission denied
so I look up what the link point to with sudo
:
$sudo readlink -f /proc/1/exe
/usr/lib/systemd/systemd
$ls -ld /usr/lib/systemd #check if r+x for the dir to traverse it
drwxr-xr-x 14 root root 4.0K May 18 19:34 /usr/lib/systemd/ #yes I do
So I do have rx permission for others, but with symbolic link /proc/1/exe
I cannot read the dir (traverse it) without sudo
. Why?
procfs
is it's own thing and doesn't necessarily follow all the rules expected from other filesystems still applies, but I haven't dug out the detail of whereEACCES
comes from here. – user4556274 May 24 '20 at 20:54