Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What does the letter S mean below? The file in question is a folder.

                                                                enter image description here

I read here that an upper-case S can represent that the setgid bit is active for a binary executable. But this is a folder. Does it still mean that the setgid bit is activated for it? If so, what does that mean?

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

That mean that any file dropped into the folder will take on the folder's owning group.

For example - suppose you have a folder called "shared" which belongs to user "intrpc" and group "users", and you drop a file into it, the copy will be belong to "intrpc" and "users" .

On most systems, if a directory's set-group-ID bit is set, newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set-group-ID bit of the parent directory.

you can read about it here.

Why is it upper-cased (from the link you gave) ?

setgid has no effect if the group does not have execute permissions. setgid is represented with a lower-case "s" in the output of ls. In cases where it has no effect it is represented with an upper-case "S".

share|improve this answer
add comment

The upper case S is because the directory does not have execute permissions for the group. In a way this indicates an "error", as you are saying:

newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set-group-ID bit of the parent directory.

However, you are denying permission for the group members to enter the directory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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