And to conclude this section, we finally take a look at the elusive first digit
of a numeric mode. As you can see, this first digit is used for setting the
sticky, suid and sgid bits:
suid | sgid | sticky | mode digit |
on | on | on | 7 |
on | on | off | 6 |
on | off | on | 5 |
on | off | off | 4 |
off | on | on | 3 |
off | on | off | 2 |
off | off | on | 1 |
off | off | off | 0 |
Here's an example of how to use a 4-digit numeric mode to set permissions for a
directory that will be used by a workgroup:
# chmod 1775 /home/groupfiles
As homework, figure out what the meaning of the 1755 numeric
permissions setting. :)