User Tools

Site Tools


Sidebar

projects

ntr0 (due 20220119)
pct1 (bonus; due 20220119)
wcp1 (due 20220119)
adm0 (due 20220126)
pct2 (due 20220126)
wcp2 (due 20220126)
pbx0 (due 20220202)
pct3 (bonus; due 20220202)
wcp3 (due 20220202)
pbx1 (due 20220209)
pct4 (due 20220209)
wcp4 (due 20220209)
gfo0 (due 20220216)
pbx2 (due 20220216)
pct5 (bonus; due 20220216)
wcp5 (due 20220216)
bwp1 (bonus; due 20220302)
pct6 (due 20220302)
usr0 (due 20220302)
wcp6 (due 20220302)
pct7 (bonus; due 20220309)
upf0 (due 20220309)
wcp7 (due 20220309)
pct8 (due 20220316)
upf1 (due 20220316)
wcp8 (due 20220316)
gfo1 (due 20220323)
mtf0 (due 20220323)
pct9 (bonus; due 20220323)
wcp9 (due 20220323)
bwp2 (bonus; due 20220406)
pctA (due 20220406)
wcpA (due 20220406)
wpa0 (due 20220406)
pctB (bonus; due 20220413)
pwn0 (due 20220413)
wcpB (due 20220413)
ldg0 (due 20220420)
pctC (due 20220420)
wcpC (due 20220420)
gfo2 (due 20220427)
pctD (bonus; due 20220427)
wcpD (bonus; due 20220427)
pctE (bonus; due 20220504)
wcpE (bonus; due 20220504)
EoCE (due 20220512)
haas:spring2022:unix:projects:usr0

This is an old revision of the document!


Corning Community College

CSCS1730 UNIX/Linux Fundamentals

Project: UNIX SKILLS REVIEW (usr0)

Objective

To practice/review some previously utilized skills in order to obtain better mastery (assuming you've done the reading and successfully completed prior encounters with this topic).

It has been a while since we first encountered file permissions; yet they constantly remain ready to be put to use in our problem solving endeavours. I figure it would be a good time to have you review that concept, so this is a project dedicated to that, along with exploring them in further depth (and, well, time management).

Reference

Be sure you are familiar with the octal file permissions, as are used with the chmod command. You might want to check out:

  • chmod(1)
  • chmod(2)

Review Topic

For this week, the main topic of review will be file permissions. We see them when running an ls -l, for example:

lab46:/usr/local/bin$ ls -l s[ut]*
-rwxr-x--- 1 root lab46   105 Sep  9  2014 status
-rwxr-x--- 1 root lab46  1263 Nov 25 09:48 status.logic
-rwxr-x--- 1 root lab46 12307 Nov 11 04:52 submit
lab46:/usr/local/bin$ 

Of course, the file permission part is:

    -rwxr-x---

We split this into 3 fields (the leftmost dash is an additional field, and is for the file type) into user, group, and other.

Breakdown is as follows:

  • read (r) is 4
  • write (w) is 2
  • execute/search (x) is 1
  • nothing (-) is 0

In any given field, we add up the values, which will result in a value within the range 0-7.

So, in our example above, broken down showing the component permissions:

               u      g      o
          -   rwx    r-x    -w-
               7      5      2

I wrote a tool for you to use in this project; it is called urev. It is located on and run on lab46.

Your task will be to run this and complete a minimum of 144 problems (you'll be able to do a maximum of 192– and those that do more than 144 may see some benefit), in groups of 12 at a time (so you don't blow through them all in one sitting.. there's also a time delay before you can do the next set of 12– so you clearly shouldn't wait until the last minute).

To use urev, basically type in the 3 or 4 octal values matching the problem displayed (in the above example, you'd type in '7' '5' and '2', and upon pressing each one, it will appear on the screen.

If you get all 3 (or 4) correct, you'll earn a point. (Careful not to type too fast, otherwise the output may appear garbled).

4th tier

If you recall, there is an additional tier of permissions, corresponding to the “SetUID”, “SetGID”, and “Sticky Bit” modes. These represent a fourth value (the leading value).

Be aware: Once you reach your 96th problem, this mode will be unlocked, and all modes entered will be 4-octal values long.

Breakdown is as follows:

  • SetUID (s) is 4
    • this will manifest in the user field, overlaying the 'x' bit
    • if no 'x' bit is present, 's' will be CAPITAL (S).
  • SetGID (s) is 2
    • this will manifest in the group field, overlaying the 'x' bit
    • if no 'x' bit is present, 's' will be CAPITAL (S).
  • Sticky Bit (t) is 1
    • this will manifest in the other field, overlaying the 'x' bit
    • if no 'x' bit is present, 't' will be CAPITAL (T).
  • nothing (-) is 0

Over time, there may be changes in display form and difficulty. Think it through, answer with confidence!

Submission

Submission for this project is super-easy: simply complete the minimum required problems (144) by the deadline; no need to manually submit anything- just doing your urev allotments on lab46 is all that needs to be done.

There is an opportunity to gain bonus points, and/or make up for mistakes made during the performing of this project, by doing more problems in addition to the 144 minimum.

A central focus of this project is an enforced time management. You may want to plan ahead to make sure you budget the adequate time so you do not end up missing out.

I'll be evaluating the project based on the following criteria:

78:usr0:final tally of results (78/78)
*:usr0:completed required 3-tier problems successfully [39/39]
*:usr0:completed required 4-tier problems successfully [39/39]

NOTE: as with other projects, in order to get credit for the project it must be submitted. To submit this project, you must have completed 144 problems. Not doing so will not garner you any points.

haas/spring2022/unix/projects/usr0.1644924231.txt.gz · Last modified: 2022/02/15 11:23 by wedge