diff options
| -rw-r--r-- | README.md | 41 |
1 files changed, 24 insertions, 17 deletions
@@ -143,12 +143,12 @@ See `exercises/chapter-7.17`. Permission bits are organized as follows: -| t | r | w | x | r | w | x | r | w | x | +| - | r | w | x | r | w | x | r | w | x | -* The first bit indicates if the file is a directory or has the `setuid` bit enabled. -* The following 3 bits represent the read, write, execute permissions for the user. -* The following 3 bits represent the read, write, execute permissions for the group. -* The following 3 bits represent the read, write, execute permissions for everyone else. +* The first bit indicates entry type. (d: directory, c: character special file, l: symbolic link, s: socket) +* The following 3 bits represent the read, write, execute permissions for the `user`. +* The following 3 bits represent the read, write, execute permissions for the `group`. +* The following 3 bits represent the read, write, execute permissions for `everyone` else. E.g @@ -162,23 +162,30 @@ $ ls -alh README.md * The following `r--` indicate read permissions for members of the group. * The following `r--` indicate read permissions for everyone else. -8. How many user groups exist on your system? How did you get your answer? -What groups are you a member of and what is your default group? -How many groups is root a member of, on your system? -How did you obtain your answer? -If used any commands, show the commands and their outputs. +8. How many user groups exist on your system? + +There are 3 groups on my system. ```bash -$ users -mokha -$ id -Gn -staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 $ groups -staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +mokha wheel docker +``` + +What groups are you a member of and what is your default group? + +I am a member of the groups `mokha`, `wheel` and `docker`. `mokha` is my +default group. + +```bash $ groups mokha -staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +mokha : mokha wheel docker +``` + +How many groups is root a member of, on your system? + +```bash $ groups root -wheel daemon kmem sys tty operator procview procmod everyone staff certusers localaccounts admin com.apple.sharepoint.group.1 _appstore _lpadmin _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +root : root ``` See `exercises/chapter-8.8`. |
