Search CTRL + K


SGID 类似于 SUID,有两个功能:

通常 SGID 用于需要多个用户团队协作的场合,某个目录设置 SGID 后,这个组内的所有用户都能访问该目录下任意文件。

❯ ls -al
drwxrwsr-x 77k root  3 Mar 00:45 test

如果目录所有者不拥有执行权限,则会显示为大写 S

有两个方法设置 SGID

group + s (pecial)

Commonly noted as SGID, this special permission has a couple of functions:[1]

  • If set on a file, it allows the file to be executed as the group that owns the file (similar to SUID)
  • If set on a directory, any files created in the directory will have their group ownership set to that of the directory owner

  1. ↩︎