Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: dchmod: Add ability to set the SETUID/SETGID bits #544

Open
cmharr opened this issue Jan 9, 2023 · 0 comments
Open

Feature Request: dchmod: Add ability to set the SETUID/SETGID bits #544

cmharr opened this issue Jan 9, 2023 · 0 comments

Comments

@cmharr
Copy link

cmharr commented Jan 9, 2023

Currently, there doesn't seem to be a way to set the SETUID or SETGID bits on file permissions, i.e. u+s and g+s. We use that feature on various large file systems, so it would be helpful to have this option available when updating a large directory tree.

From the chmod man page:

SETUID AND SETGID BITS
       chmod clears the set-group-ID bit of a regular file if the file's group ID does not match the user's effective group ID or one  of  the  user's
       supplementary  group  IDs, unless the user has appropriate privileges.  Additional restrictions may cause the set-user-ID and set-group-ID bits
       of MODE or RFILE to be ignored.  This behavior depends on the policy and functionality of the underlying chmod system  call.   When  in  doubt,
       check the underlying system behavior.

       chmod  preserves  a  directory's set-user-ID and set-group-ID bits unless you explicitly specify otherwise.  You can set or clear the bits with
       symbolic modes like u+s and g-s, and you can set (but not clear) the bits with a numeric mode.
@cmharr cmharr changed the title dchmod: Add ability to set the SETUID/SETGID bits Feature Request: dchmod: Add ability to set the SETUID/SETGID bits Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant