summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-03-19 14:33:08 +0100
committerlonkaars <loek@pipeframe.xyz>2023-03-19 14:33:08 +0100
commit060238054edbe95b3b517fbab493488863d25908 (patch)
treed8ab8ce835f74590a8377bb9a8fdda6860fb0593
parent92d35a975b45fe4696be370ab68c285bbeef65f2 (diff)
os week 6 klaar
-rw-r--r--os1w6/practicum.md67
1 files changed, 67 insertions, 0 deletions
diff --git a/os1w6/practicum.md b/os1w6/practicum.md
new file mode 100644
index 0000000..eb12945
--- /dev/null
+++ b/os1w6/practicum.md
@@ -0,0 +1,67 @@
+# practicum week 6
+
+## 1
+
+```bash
+zsh$ sh
+sh-5.1$ sleep 300 &
+[1] 21569
+sh-5.1$ ps -l
+F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
+0 S 1000 21433 21126 1 80 0 - 3014 sigsus pts/2 00:00:00 zsh
+0 S 1000 21555 21433 0 80 0 - 2234 do_wai pts/2 00:00:00 sh
+0 S 1000 21569 21555 0 80 0 - 1636 hrtime pts/2 00:00:00 sleep
+4 R 1000 21570 21555 0 80 0 - 2825 - pts/2 00:00:00 ps
+sh-5.1$
+exit
+zsh$ ps -l
+F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
+0 S 1000 21433 21126 1 80 0 - 3014 sigsus pts/2 00:00:00 zsh
+0 S 1000 21569 1 0 80 0 - 1636 hrtime pts/2 00:00:00 sleep
+4 R 1000 21609 21433 0 80 0 - 2825 - pts/2 00:00:00 ps
+zsh$
+```
+
+De parent process id van het sleep commando is veranderd naar 1
+
+## 2
+
+1. Nee
+2. PID 1 is het `/sbin/init` commando (systemd):
+ ```bash
+ $ ps 1
+ PID TTY STAT TIME COMMAND
+ 1 ? Ss 0:02 /sbin/init
+ $ file /sbin/init
+ /sbin/init: symbolic link to ../lib/systemd/systemd
+ $
+ ```
+3. Dit is wat er ook in het hoorcollege is verteld (denk ik)
+
+## 3
+
+```bash
+$ pwd
+/home/loek/docs/repos/os-huiswerk/os1w6
+$ ls -l
+total 4
+-rw-r--r-- 1 loek users 1199 Mar 19 14:25 practicum.md
+$ ls -l ..
+total 24
+drwxr-xr-x 2 loek users 4096 Feb 4 17:09 os1w1
+drwxr-xr-x 2 loek users 4096 Feb 11 15:19 os1w2
+drwxr-xr-x 2 loek users 4096 Feb 28 15:01 os1w3
+drwxr-xr-x 2 loek users 4096 Mar 5 17:49 os1w4
+drwxr-xr-x 2 loek users 4096 Mar 19 14:12 os1w5
+drwxr-xr-x 2 loek users 4096 Mar 19 14:25 os1w6
+$
+```
+
+3. De gebruiker is `loek` en de groep is `users`
+4. De standaard permissies zijn ook `loek` en `users`, omdat ik deze niet
+ handmatig aangepast heb
+5. Ja, het maakt niet uit of joop ook in de groep `users` zit, omdat het
+ bestand voor alle gebruikers minstens `r--` heeft.
+6. Joop kan de inhoud niet wijzigen omdat hij geen schrijfrecht heeft.
+7. Om het bestand te verwijderen heeft joop lees- schrijf- en uitvoerrechten
+ nodig op de bovenliggende map. Joop kan het bestand dus niet verwijderen.