User Tools

Site Tools


Sidebar

projects

  • uxi0 (due 20160127)
  • arc0 (due 20160203)
  • pbx0 (due 20160210)
  • pbx1 (due 20160224)
  • wpa0 (due 20160302)
  • cus0 (due 20160309)
  • udr0 (due 20160316)
  • udr1 (due 20160323)
  • udr2 (due 20160406)
  • upr0 (due 20160413)
  • gfo0 (due 20160420)
haas:spring2016:unix:projects:upr0

Corning Community College

CSCS1730 UNIX/Linux Fundamentals

~~TOC~~

Project: UNIX PERMISSION REVIEW (upr0)

Objective

To practice/review some previously learned skills in order to obtain better mastery.

It has been a while since we first covered file permissions; yet we have been making use of them ever since. I figure it would be a good time to have you review that concept, so this is a project dedicated to that (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 called urev.

Your task will be to run this and complete 144 problems (you'll be able to do a maximum of 196– 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.

haas/spring2016/unix/projects/upr0.txt · Last modified: 2016/04/05 12:47 by wedge