User Tools

Site Tools


Sidebar

projects

ntr0 (due 20210825)
pct1 (bonus; due 20210819)
wcp1 (due 20210818)
adm0 (due 20210825)
pct2 (due 20210825)
wcp2 (due 20210825)
pbx0 (due 20210901)
pct3 (bonus; due 20210901)
wcp3 (due 20210901)
pbx1 (due 20210908)
pct4 (due 20210908)
wcp4 (due 20210908)
pbx2 (due 20210915)
gfo0 (due 20210915)
pct5 (bonus; due 20210915)
wcp5 (due 20210915)
upf0 (due 20210922)
pct6 (due 20210922)
wcp6 (due 20210922)
upf1 (due 20210929)
pct7 (bonus; due 20210929)
wcp7 (due 20210929)
wpa0 (due 20211006)
pct8 (due 20211006)
wcp8 (due 20211006)
usr0 (due 20211020)
pct9 (bonus; due 20211020)
bwp1 (bonus; due 20211020)
wcp9 (due 20211020)
mtf0 (due 20211027)
gfo1 (due 20211027)
pctA (due 20211027)
wcpA (due 20211027)
pwn0 (due 20211103)
pctB (bonus; due 20211103)
wcpB (due 20211103)
ldg0 (due 20211110)
pctC (due 20211110)
wcpC (due 20211110)
gfo2 (due 20211117)
pctD (bonus; due 20211117)
pctE (bonus; due 20211201)
bwp2 (bonus; due 20211201)
EoCE (due 20211209)
haas:fall2021:unix:projects:usr0

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).

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    r-x
               7      5      5

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 '5', 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 sets by the deadline; no need to manually submit anything- just doing your urev allotments is all that needs to be done.

haas/fall2021/unix/projects/usr0.txt · Last modified: 2021/09/25 16:21 by wedge