When could or should I use chmod g+s on a file or directory?

后端 未结 8 1452
日久生厌
日久生厌 2021-01-30 13:47

In deploying to a new (Solaris 9) environment recently, one of the steps was to copy a set of files and directories to their new location and then to apply the group UID bit (us

8条回答
  •  一整个雨季
    2021-01-30 14:12

    For executable files, this means that when the file is executed, it is executed as the group that owns the file, not the group of the user executing the file.

    This is useful if you want users to be able to assume the permissions of a particular group just for running one command.

    However, it is also a security risk as it is allowing users to elevate their permissions. You have to know that the scripts with this bit set aren't going to do anything that would let users abuse these extra permissions.

提交回复
热议问题