FreeBSD setuid权限的问题
根据FreeBSD 9.1 info chmod中所说:Executable files with this bit set will run with effective uid set to the uid of the file owner. Directories with this bit set will force all files and subdirectories created in them to be owned by the directory owner and not by the uid of the creating process, if the underlying file system supports this feature.
tree路径的setuid模式位被设为4。
如下图我用另外一个用户在tree的目录下创建了一个文件,为什么owner不是tree?是不是我对info中的意思理解有问题?请高手解答!3QU!!!
刚学FreeBSD。如果问题太低级,请给位不要BS 刚学FreeBSD。如果问题太低级,请给位不要BS 是不是FreeBSD底层文件系统不支持此特性。
提问这么长时间都没人回复啊!我自娱自乐! 回复 1# hongshaohu
后面还有关键的一句:
: see chmod(2)
and the suiddir option to mount(8).
正常情况下,你应该先去看man mount,再找suid部分。 刚刚好奇去看了一下
目录设置SUID,需要在mount中使用suiddir挂载选项
注: 该选项有安全风险,针对shell的情况比较明显(from man 8 mount)
另外,需要在内核中启用选项 SUIDDIR,9.1的man mount中显示只支持UFS
页:
[1]