你如何让linux来纪念setuid目录?

前段时间在IRC的对话中,我在一个频道中的一个用户建议有人设置一个目录,以便它继承文件上的用户ID以解决其他人遇到的问题.当时我开口说“ linux不支持setuid目录”.之后,提供建议的人向我展示了他的系统的pastebin( http://codepad.org/4In62f13),以纪念目录上的setuid权限集.

只是解释一下,当我说“linux不支持setuid目录”时,我的意思是你可以去“chmod你的目录”,它会在目录上设置一下.但是,linux(我理解它)忽略了这一点(在目录上).

尽我所能,我不能完全复制那个pastebin.有人曾向我建议,可以使用selinux模拟行为 – 并且可以使用规则,可以强制uid在文件上,但不能从setuid目录权限(我可以看到).在互联网上阅读已经相当缺乏信息 – 大多数地方声称“不,目录上的setuid不能与linux一起工作”偶尔“它可以在特定情况下完成”(例如:http://arstechnica.com/etc/linux/2003/linux.ars-12032003.html)

我不记得原来是谁,但原来的系统是debian 6系统,它运行的文件系统是用“default,acl”挂载的xfs.我试过复制它,但到目前为止没有运气(到目前为止尝试了各种版本的debian,ubuntu,fedora和centos)

任何人都可以告诉我你在什么或如何获得一个系统来纪念目录上的setuid?

解决方法

目录的Setuid不像setgid.除非,shell输出来自FreeBSD,否则有些人感到无聊并且花费一点点乐趣.

The setuid permission set on a directory is ignored on UNIX and Linux systems.[4] FreeBSD can be configured to interpret it analogously to setgid,namely,to force all files and sub-directories to be owned by the top directory owner.[5]

In FreeBSD,directories behave as if their setgid bit was always set,regardless of its actual value. As is stated in open(2),“When a new file is created it is given the group of the directory which contains it.”

http://en.wikipedia.org/wiki/Setuid#setuid_and_setgid_on_directories

相关文章

Linux中的ARP防火墙主要用于防御ARP欺骗攻击,其效果取决于多...
insmod和modprobe加-f参数导致Invalid module format错误 这...
将ArchLinux安装到U盘 几个月前入门Arch的时候上网搜了不少安...
1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...