0

I have a question about the setgid on a file. The following example file has these permissions with the GID set.

-r-xr-sr-x root mail 829672 Jun 4 2014 hoststat

I understand that the GID transfers group ownership to the directory that the file is part and users are granted access based on the owning directories permissions. So would this make the owner permissions on this file less restrictive than the group permissions? I'm thinking it does not make the owners permissions less restrictive because you're allowing users more access based on the owning directories permissions, but I'm not sure if I'm right.

1

The setgid bit on files have nothing to do with directories. The setgid bit in your example means that the hoststat executable is run with a group id set to the I'd of the mail group, presumably because it needs controlled access to files or directories owned by group mail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.