summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2019-05-18 18:31:37 -0600
committermokha <mokha@cisco.com>2019-05-18 18:31:37 -0600
commit3de80cfb8b9da4e584eeab1556f67c3e363eda40 (patch)
treef6e059782aa9990a3c98ccdb4a52c8a0298d65f5
parenta34c92095132075e8aa2d4497e2b531c4b56db30 (diff)
complete exercise
-rw-r--r--README.md14
-rw-r--r--exercises/chapter-8.914
2 files changed, 27 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8c712a2..f945757 100644
--- a/README.md
+++ b/README.md
@@ -161,8 +161,20 @@ staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.appl
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
```
+9. Create a file test1 in your present working directory and set its access privileges to read and write for yourself,
+read for the users in your group, and none to everyone else.
+What command did you use to set privileges?
+Give another command that would accomplish the same thing.
+
+```bash
+touch test1
+chmod 640 test1
+ls -alh test1
+-rw-r----- 1 mokha staff 0B 18 May 18:16 test1
+chmod u=rw,g=r,o= test1
+-rw-r----- 1 mokha staff 0B 18 May 18:17 test1
+```
-9. Create a file test1 in your present working directory and set its access privileges to read and write for yourself, read for the users in your group, and none to everyone else. What command did you use to set privileges? Give another command that would accomplish the same thing.
10. The user ‘sarwar’ sets access permissions to his home directory by using the command chmod 700 $HOME. If the file cp.new in his home directory has read permissions to 777, can anyone read this file? Why or why not? Explain your answer.
11. What is the effect of each command? Explain your answers.
a. chmod 776 ∼/lab5
diff --git a/exercises/chapter-8.9 b/exercises/chapter-8.9
new file mode 100644
index 0000000..bfe4da5
--- /dev/null
+++ b/exercises/chapter-8.9
@@ -0,0 +1,14 @@
+Script started on Sat May 18 18:28:36 2019
+bash-3.2$ touch test1
+bash-3.2$ chmod 640 test1
+bash-3.2$ ls -alh test1
+-rw-r----- 1 mokha staff 0B 18 May 18:27 test1
+bash-3.2$ rm test1
+bash-3.2$ touch test1
+bash-3.2$ chmod u=rw,g=r,o= test1
+bash-3.2$ ls -alh test1
+-rw-r----- 1 mokha staff 0B 18 May 18:28 test1
+bash-3.2$ exit
+exit
+
+Script done on Sat May 18 18:29:15 2019