From 29154349c11e43fece205c663136b7450c010f67 Mon Sep 17 00:00:00 2001 From: mo Date: Sat, 25 May 2019 13:51:27 -0600 Subject: complete 8.16 --- README.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 8f6e9ba..31c4aee 100644 --- a/README.md +++ b/README.md @@ -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. -- cgit v1.2.3