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. On a few systems, a directory's set-user-ID
bit has a similar effect on the ownership of new subfiles and
the set-user-ID bits of new subdirectories. These mechanisms let
users share files more easily, by lessening the need to use
chmod or chown to share new files. These convenience mechanisms
rely on the set-user-ID and set-group-ID bits of directories. If
commands like chmod and mkdir routinely cleared these bits on
directories, the mechanisms would be less convenient and it
would be harder to share files. Therefore, a command like chmod
does not affect the set-user-ID or set-group-ID bits of a
directory unless the user specifically mentions them in a
symbolic mode, or uses an operator numeric mode such as ‘=755’,
or sets them in a numeric mode, or clears them in a numeric mode
that has five or more o