如上图所示,造成这个原因是什么啊
如上图所示,造成这个原因是什么啊
|
liuxuApr 10, 2020
1
google 一下你就知道了。权限在 inode 里,软连接只是指向了文件的 inode,然后读取 passwd 的 inode 里面的权限数据,你这用户的权限没有
|
|
chouryApr 10, 2020
3
strace cat xxx
看下什么错误不就知道了 |
|
cnt2exApr 11, 2020
4
似乎是和目录的 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
/proc/sys/fs/protected_symlinks
把值改成 0 就可以了。具体可以看 https://www.kernel.org/doc/Documentation/sysctl/fs.txt |
|
liuxuApr 11, 2020
6
你把 passwd 权限贴出来
|
|
8
这是修改为 1 的演示
 这是修改 0 的演示  |