diff options
| author | mo <mo.khan@gmail.com> | 2019-05-25 13:51:27 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2019-05-25 13:51:27 -0600 |
| commit | 29154349c11e43fece205c663136b7450c010f67 (patch) | |
| tree | e5e253334cc13b0b4faeb72d2492325dbd9a7488 /README.md | |
| parent | d5500cd77061f54c5d2b4b7e13386c3f6b0ce14b (diff) | |
complete 8.16
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 30 |
1 files changed, 25 insertions, 5 deletions
@@ -350,17 +350,37 @@ formula: The desired `umask` value would be `027`. ```bash -[root@2a10b6355d3a ~]# mkdir before -[root@2a10b6355d3a ~]# umask 027 -[root@2a10b6355d3a ~]# mkdir after -[root@2a10b6355d3a ~]# ls -l +$ mkdir before +$ umask 027 +$ mkdir after +$ ls -l drwxr-x---. 2 root root 4096 May 25 19:36 after drwxr-xr-x. 2 root root 4096 May 25 19:36 before ``` See `exercises/chapter-8.15`. -16. Give chmod command lines that perform the same tasks that the mesg n and mesg y commands do. (Hint: Every hardware device, including your terminal, has an associated file in the /dev directory.) +16. Give `chmod` command lines that perform the same tasks that the `mesg n` and `mesg y` commands do. (Hint: Every hardware device, including your terminal, has an associated file in the /dev directory.) + +`mesg n` blocks write access to the currently logged in users `tty` by +any other users. `mesg y` allows write access to the currentl logged in +users `tty` session. + +To accomplish the same tasks without using `mesg` you will need to +identity which device the current tty is attached to. This can be done +by using the `tty` program. Once the device is identified, you can +change the permissions for that file. + +```bash +$ tty +/dev/pts/6 +$ ls -alh /dev/pts/6 +crw--w----. 1 mokha 136, 6 May 25 13:45 /dev/pts/6 +$ chmod 600 /dev/pts/6 +``` + +See `exercises/chapter-8.16`. + 17. What are the purposes of the set-user-ID (SUID), set-group-ID (SGID), and sticky bits? ## Do problem 9 (What do the following commands do?) in Chapter 9. |
