如上图所示,造成这个原因是什么啊

如上图所示,造成这个原因是什么啊
1 liuxu Apr 10, 2020 google 一下你就知道了。权限在 inode 里,软连接只是指向了文件的 inode,然后读取 passwd 的 inode 里面的权限数据,你这用户的权限没有 |
3 choury Apr 10, 2020 strace cat xxx 看下什么错误不就知道了 |
4 cnt2ex Apr 11, 2020 似乎是和目录的 sticky bits 有关。 https://lwn.net/Articles/390565/ The solution is to permit symlinks to only be followed when outside a sticky world-writable directory, or when the uid of the symlink and follower match, or when the directory owner matches the symlink's owner. |
5 cnt2ex Apr 11, 2020 /proc/sys/fs/protected_symlinks 把值改成 0 就可以了。具体可以看 https://www.kernel.org/doc/Documentation/sysctl/fs.txt |
6 liuxu Apr 11, 2020 你把 passwd 权限贴出来 |
8 vencentge OP 这是修改为 1 的演示  这是修改 0 的演示  |