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 Answer 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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .