我的机器上有 2 个用户:linuxlite
和otheruser
.
otheruser
有一个文件:
otheruser@linuxlite:~$ ls -l a
-rw-rw-r-- 1 otheruser otheruser 6 Mar 31 12:47 a
otheruser@linuxlite:~$ cat a
hello
Run Code Online (Sandbox Code Playgroud)
linuxlite
制作了一个文件和一个符号链接/tmp
:
otheruser@linuxlite:~$ ls -l /tmp/file /tmp/link
-rw-rw-r-- 1 linuxlite linuxlite 3 Mar 31 12:49 /tmp/file
lrwxrwxrwx 1 linuxlite linuxlite 17 Mar 31 12:49 /tmp/link -> /home/otheruser/a
Run Code Online (Sandbox Code Playgroud)
现在,虽然otheruser
可以阅读/tmp/file
和/home/otheruser/a
,但他无法阅读/tmp/link
:
otheruser@linuxlite:~$ cat /tmp/file
hi
otheruser@linuxlite:~$ cat /home/otheruser/a
hello
otheruser@linuxlite:~$ cat /tmp/link
cat: /tmp/link: Permission denied
Run Code Online (Sandbox Code Playgroud)
我的问题是, …