haas/spring2026/unix/projects/images/usr0class.fall2023.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0class.fall2023.png differ
haas/spring2026/unix/projects/images/usr0class.fall2024.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0class.fall2024.png differ
haas/spring2026/unix/projects/images/usr0class.fall2025.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0class.fall2025.png differ
haas/spring2026/unix/projects/images/usr0class.spring2023.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0class.spring2023.png differ
haas/spring2026/unix/projects/images/usr0class.spring2024.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0class.spring2024.png differ
haas/spring2026/unix/projects/images/usr0class.spring2025.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0class.spring2025.png differ
haas/spring2026/unix/projects/images/usr0user.fall2023.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0user.fall2023.png differ
haas/spring2026/unix/projects/images/usr0user.fall2024.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0user.fall2024.png differ
haas/spring2026/unix/projects/images/usr0user.fall2025.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0user.fall2025.png differ
haas/spring2026/unix/projects/images/usr0user.spring2023.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0user.spring2023.png differ
haas/spring2026/unix/projects/images/usr0user.spring2024.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0user.spring2024.png differ
haas/spring2026/unix/projects/images/usr0user.spring2025.png
... ...
Binary files /dev/null and b/haas/spring2026/unix/projects/images/usr0user.spring2025.png differ
haas/spring2026/unix/projects/usr0.md
... ...
@@ -0,0 +1,305 @@
1
+# CSCS1730 UNIX/Linux Fundamentals
2
+
3
+# PROJECT: UNIX SKILLS REVIEW (usr0)
4
+
5
+## OBJECTIVE
6
+
7
+To practice/review some previously utilized skills in order to obtain
8
+better mastery (assuming you've done the reading and successfully
9
+completed prior encounters with this topic), in combination with a
10
+specific focus on time management.
11
+
12
+It has been a while since we first encountered file permissions; yet they
13
+constantly remain ready to be put to use in our problem solving
14
+endeavours. I figure it would be a good time to have you review that
15
+concept, so this is a project dedicated to that, along with exploring
16
+them in further depth (and, well, time management).
17
+
18
+## REFERENCE
19
+
20
+Be sure you are familiar with the octal file permissions, as are used
21
+with the **chmod** command. You might want to check out:
22
+
23
+ * **chmod**(**1**)
24
+ * **chmod**(**2**)
25
+
26
+## REVIEW TOPIC
27
+
28
+For this week, the main topic of review will be file permissions. We see
29
+them when running an **ls -l**, for example:
30
+
31
+```
32
+lab46:/usr/local/bin$ ls -l s[uta]*
33
+-rwxr-xr-x 1 root staff 3126 Oct 3 2023 /usr/local/bin/sanitizehg
34
+-rwx------ 1 root staff 3646 Feb 25 2021 /usr/local/bin/sanitizewebfiles
35
+-rwxr-x--- 1 wedge lab46 763 Nov 19 2024 /usr/local/bin/status
36
+-rwxr-x--- 1 wedge lab46 11002 Apr 21 2022 /usr/local/bin/status.logic
37
+-rwxr-x--- 1 wedge lab46 16974 Mar 31 2024 /usr/local/bin/submit
38
+-rwxr-x--- 1 wedge lab46 7108 Oct 29 2021 /usr/local/bin/submitchk
39
+lab46:/usr/local/bin$
40
+```
41
+
42
+Of course, the file permission part is:
43
+
44
+```
45
+ -rwxr-x---
46
+```
47
+
48
+We split this into 3 fields (the leftmost dash is an additional field,
49
+and is for the file type) into user, group, and other.
50
+
51
+ * `-` indicates a regular file (not part of the file permission scheme)
52
+ * `rwx` corresponds to the user permissions
53
+ * `r-x` corresponds to the group permissions
54
+ * `---` corresponds to those who are neither the user nor the group
55
+
56
+Breakdown is as follows:
57
+
58
+ * read `(r)` is 4
59
+ * write `(w)` is 2
60
+ * execute/search `(x)` is 1
61
+ * nothing `(-)` is 0
62
+
63
+In any given field, we add up the values, which will result in a value
64
+within the range 0-7.
65
+
66
+So, in our example above, broken down showing the component permissions:
67
+
68
+
69
+```
70
+ u g o
71
+ - rwx r-x ---
72
+ 7 5 0
73
+```
74
+
75
+Practice: Come up with the file permissions for all the files listed in
76
+the example above. See how you fare.
77
+
78
+I wrote a tool for you to use in this project; it is called **urev**. It
79
+is located on and run on lab46.
80
+
81
+Your task will be to run this and complete a minimum of 144 problems
82
+(you'll be able to do a maximum of 192-- and those that do more than 144
83
+may see some benefit), in groups of 12 at a time (so you don't blow
84
+through them all in one sitting.. there's also a time delay before you
85
+can do the next set of 12-- so you clearly shouldn't wait until the last
86
+minute).
87
+
88
+To use **urev**, basically type in the 3 or 4 octal values matching the
89
+problem displayed (in the above example, you'd type in '7' '5' and '0',
90
+and upon input of each value, it will appear on the screen.
91
+
92
+If you get all 3 (or 4) correct, you'll earn a point. (Careful not to
93
+type too fast, otherwise the output may appear garbled).
94
+
95
+Any accumulated mistakes can be mitigated by doing problems in excess of
96
+the 144 required minimum. Once any mistakes have been nullified, some
97
+apportionment of bonus points can then be attained (not to exceed half
98
+the total points the project is worth).
99
+
100
+### PRACTICE PROBLEMS
101
+
102
+```
103
+- rwx r-x r-x /usr/local/bin/sanitizehg (755)
104
+- rwx --- --- /usr/local/bin/sanitizewebfiles (700)
105
+- rwx r-x --- /usr/local/bin/status (750)
106
+- rwx r-x --- /usr/local/bin/status.logic (750)
107
+- rwx r-x --- /usr/local/bin/submit (750)
108
+- rwx r-x --- /usr/local/bin/submitchk (750)
109
+```
110
+
111
+## 4TH TIER PERMISSIONS
112
+
113
+In addition to the classic three-valued permissions, there is an
114
+additional tier of permissions, corresponding to the "SetUID", "SetGID",
115
+and "Sticky Bit" modes. These represent a fourth value (the leading
116
+value).
117
+
118
+**Be aware:** Once you reach your 96th problem, this mode will be
119
+unlocked, and all modes entered will be 4-octal values long.
120
+
121
+To maintain general compatibility with the existing structure of the
122
+system, especially organization and real estate taken up by the display
123
+of the unix filemode string, this further tier of permissions instead
124
+overlays atop the 'x' fields of the user, group, and other fields.
125
+
126
+Breakdown is as follows:
127
+
128
+ * SetUID `(s)` has a value of 4
129
+ * this will manifest in the user field, overlaying its 'x' bit position
130
+ * 's' if 'x' is present, 'S' if 'x' is not present
131
+ * SetGID `(s)` has a value of 2
132
+ * this will manifest in the group field, overlaying its 'x' bit position
133
+ * 's' if 'x' is present, 'S' if 'x' is not present
134
+ * the Sticky Bit `(t)` has a value of 1
135
+ * this will manifest in the other field, overlaying its 'x' bit position
136
+ * 't' if 'x' is present, 'T' if 'x' is not present
137
+ * nothing `(-)` is 0
138
+
139
+```
140
+lab46:/usr/bin$ ls -l at procmail su
141
+-rwsr-sr-x 1 daemon daemon 59768 Oct 15 2022 /usr/bin/at
142
+-rwsr-sr-x 1 root mail 101664 Mar 1 2022 /usr/bin/procmail
143
+-rwsr-xr-x 1 root root 72000 Nov 21 2024 /usr/bin/su
144
+lab46:/usr/bin$
145
+```
146
+
147
+Of course, the file permission part is:
148
+
149
+```
150
+ -rwsr-sr-x
151
+```
152
+
153
+We split this into 3 fields (the leftmost dash is an additional field,
154
+and is for the file type) into user, group, and other.
155
+
156
+ * `-` indicates a regular file (not part of the file permission scheme)
157
+ * `rws` corresponds to the user permissions
158
+ * `r-s` corresponds to the group permissions
159
+ * `r-x` corresponds to those who are neither the user nor are in the group
160
+
161
+In any given field, we add up the values, which will result in a value
162
+within the range 0-7. The same is the case here.
163
+
164
+We start by computing the new, topmost tier:
165
+
166
+ * Is there an 's' or 'S' in the user field? If so: 4. If not: 0.
167
+ * Is there an 's' or 'S' in the group field? If so: 2. If not: 0.
168
+ * Is there a 't' or 'T' in the other field? If so: 1. If not: 0.
169
+
170
+Breakdown is as follows:
171
+
172
+ * user has an 's', so: 4
173
+ * group has a 's', so: 2
174
+ * other does not have a 't', so: 0
175
+
176
+Add them up: 4+2+0=6. That is our first value.
177
+
178
+We then proceed to process the remaining 3 tiers as before:
179
+
180
+ * user is 'rwx' (lowercase 's' indicates an 'x' underneath), for a: 7
181
+ * group is 'r-x' (lowercase 's' indicates an 'x' underneath), for a: 5
182
+ * other is 'r-x' (if there were a lowercase 't', it would indicate an 'x' underneath), for a: 5
183
+
184
+Final 4-tier octal permission for the example is therefore: 6755.
185
+
186
+Practice with the other examples, compare your results and see how you
187
+fare.
188
+
189
+You are to calculate this tier of permissions separate from the others
190
+(it is a distinct, separate fourth octal value, leading the classic
191
+three-valued permissions you've been working on so far).
192
+
193
+Over time, there may be changes in display form and difficulty. Think it
194
+through, answer with confidence!
195
+
196
+### PRACTICE
197
+
198
+```
199
+-rwsr-sr-x /usr/bin/at (6755)
200
+-rwsr-sr-x /usr/bin/procmail (6755)
201
+-rwsr-xr-x /usr/bin/su (4755)
202
+```
203
+
204
+## TIME DELAY
205
+
206
+To reinforce mastery, there is a time delay instituted to prevent
207
+accomplishing this task in one sitting. You will have to plan your time
208
+accordingly to perform this project in the time allotted.
209
+
210
+### PROJECT STATS
211
+
212
+A general overview of how the class has approached the project:
213
+
214
+![spring2026/class](images/usr0class.spring2026.png)
215
+
216
+where each color represents one individual's activity that day, stacked
217
+with that of others, enabling an overall per day general class activity.
218
+Higher bars and larger chunks of bars denote greater activity.
219
+
220
+And a more individual effort:
221
+
222
+![spring2026/user](images/usr0user.spring2026.png)
223
+
224
+where each line is an individual's cumulative progress over the set of
225
+days the project is available. The higher the line, the more work is
226
+being done.
227
+
228
+## HISTORICAL PROJECT RESULTS
229
+
230
+### FALL2025
231
+
232
+General:
233
+![fall2025/class](images/usr0class.fall2025.png)
234
+
235
+Individual:
236
+![fall2025/user](images/usr0user.fall2025.png)
237
+
238
+### SPRING2025
239
+
240
+General:
241
+![spring2025/class](images/usr0class.spring2025.png)
242
+
243
+Individual:
244
+![spring2025/user](images/usr0user.spring2025.png)
245
+
246
+### FALL2024
247
+
248
+General:
249
+![fall2024/class](images/usr0class.fall2024.png)
250
+
251
+Individual:
252
+![fall2024/user](images/usr0user.fall2024.png)
253
+
254
+### SPRING2024
255
+
256
+General:
257
+![spring2024/class](images/usr0class.spring2024.png)
258
+
259
+Individual:
260
+![spring2024/user](images/usr0user.spring2024.png)
261
+
262
+### FALL2023
263
+
264
+General:
265
+![fall2023/class](images/usr0class.fall2023.png)
266
+
267
+Individual:
268
+![fall2023/user](images/usr0user.fall2023.png)
269
+
270
+### SPRING2023
271
+
272
+General:
273
+![spring2023/class](images/usr0class.spring2023.png)
274
+
275
+Individual:
276
+![spring2023/user](images/usr0user.spring2023.png)
277
+
278
+## SUBMISSION
279
+
280
+Submission for this project is super-easy: simply complete the minimum
281
+required problems (144) by the deadline; no need to manually submit
282
+anything- just doing your **urev** allotments on lab46 is all that needs
283
+to be done.
284
+
285
+There is an opportunity to gain bonus points, and/or make up for mistakes
286
+made during the performing of this project, by doing more problems in
287
+addition to the 144 minimum.
288
+
289
+A central focus of this project is an enforced time management. You may
290
+want to plan ahead to make sure you budget the adequate time so you do
291
+not end up missing out.
292
+
293
+### RUBRIC
294
+
295
+I'll be evaluating the project based on the following criteria:
296
+
297
+```
298
+208:usr0:final tally of results (208/208)
299
+*:usr0:completed required 3-tier problems successfully [104/104]
300
+*:usr0:completed required 4-tier problems successfully [104/104]
301
+```
302
+
303
+**NOTE:** as with other projects, in order to get credit for the project
304
+it must be submitted. To submit this project, you must have completed 144
305
+problems. Not doing so will not garner you any points.