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

后端 未结 8 1458
日久生厌
日久生厌 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:31

    Setting directories g+s makes all new files created in said directory have their group set to the directory's group.

    This can actually be really handy for collaborative purposes if you have the umask set so that files have group write by default.

    Note: This is the way it works in Linux, it could work completely differently in Solaris.

提交回复
热议问题