简体   繁体   English

如何在ubuntu中设置setgid

[英]how to set setgid in ubuntu

In my ubuntu 14.04 lts, I tried setgid command as root user but it give setgid not found, for setuid it says to install and I install . 在我的ubuntu 14.04 lts中,我尝试了setgid命令作为root用户,但是它没有找到setgid,因为setuid它说要安装并安装。 But for setgid it does not give any option. 但是对于setgid,它没有给出任何选择。 So how can I get this command in linux ubuntu 14.04 LTS 那么如何在linux ubuntu 14.04 LTS中获取此命令

When the setgid bit is set on a directory, new sub folders and files within that directory will inherit the group of the owner of the directory. 在目录上设置setgid位后,该目录中的新子文件夹和文件将继承该目录所有者的组。 If you do this on a folder, you can force new files and folders to have your group id, even if another user does the creation. 如果在文件夹上执行此操作,则可以强制新文件和文件夹具有您的组ID,即使其他用户进行了创建也是如此。

You can turn the setgid bit on by running: 您可以通过运行来打开setgid位:

chmod g+s <directory name here>

The user and group can be displayed using in the parent directory. 可以使用父目录显示用户和组。

ls -l

See: http://www.toptip.ca/2010/03/linux-setgid-on-directory.html 请参阅: http//www.toptip.ca/2010/03/linux-setgid-on-directory.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM