首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >stickybits setgid不工作

stickybits setgid不工作
EN

Unix & Linux用户
提问于 2020-08-25 21:03:10
回答 1查看 518关注 0票数 0

我的结构如下:

代码语言:javascript
复制
/home/reed/, user=reed, group=reed
  - apache-conf, user=reed, group=reed
  - apache-web, user=reed, group=apache, perm=0770
      - www.website.com, user=reed, group=apache, perm=0770
          - index.php, user=reed, group=apache, perm=0660

我在umask 007中使用/etc/profile,所以我的目录和文件都是用这些相同的权限创建的。&这起作用了。

我运行了chmod g+s /home/reed/apache-web;chmod g+s /home/reed/apache-web/www.website.com,所以新目录将保留group=apache

因此,我mkdir /home/reed/apache-web/test/,然后ls -la ... &它显示reed既是用户又是组。

我尝试使用chmod 4770 /home/reed/apache-web/test/,但mkdir仍然将用户和组设置为reed (如果我使用sudo运行,则设置为root )。

我在www.website.com dir中也尝试了同样的结果。

我在Debian 10上,有根目录访问。我还尝试切换到user=apache & group=reed,然后使用chmod u+s thedir,但是再次,mkdir使用户和组都成为当前的shell用户。我也尝试过注销&重新登录。

EN

回答 1

Unix & Linux用户

发布于 2020-08-25 21:24:18

我想您已经安装了/home和nosuid选项:

nosuid Do not allow set-user-identifier or set-group-identifier bits to take effect.

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/606319

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档