rws的作用(Role of RWS)

rws的解释:
当文件的权限为rws时,表示当用户去访问这个文件时,不是用自己的权限,而是用的文件的所用者的权限访问该文件。

如何设置:
chmod u+s
chmod +x

rws:设置了set-uid的flag,并且有执行权限
rwS:设置了set-uid的flag,但是没有加可执行权限

Reference:
https://dev.to/0xbf/you-know-rwx-but-what-is-rws-when-run-ls-l-linux-tips-549c

————————

Explanation of RWS:
When the permission of the file is RWS, it means that when users access the file, they access the file not with their own permission, but with the permission of the user of the file.

How to set:
chmod u+s
chmod +x

RWS: set the flag of set uid and have execution permission
RWS: set uid flag, but no executable permission

Reference:
https://dev.to/0xbf/you-know-rwx-but-what-is-rws-when-run-ls-l-linux-tips-549c