Course Info / Syllabus

Labs

Lecture Topics

Exam Reviews

Source Code & Other Resources


Operating Systems Concepts & Design

Lab 02 - Permissions

Lab Procedure

Beginning with this lab, you will be accessing an AWS instance - a virtual system hosted on the cloud - to access a Ubuntu server environment. If a lab or lab section explicitly states that you must work in your AWS environment, do so. There will be a biweekly check to make sure you are using the AWS environment to try out commands and perform work.

Go to your cloned repository folder (likely named ceg2350f25-yourgithubusername). Refer back to Lab 01 if you need a reminder for how to clone your repository. You only need to clone your repository once on each system.

Create a new directory, Lab02

Create a file named README.md in the Lab02 folder. The Lab 02 Template can be copied from this link:

You may refer to additional resources outside of the recommended resources provided.

Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations section of your lab answers. To add citations, provide the site and a summary of what it assisted you with. If generative AI was used, include which generative AI system was used and what prompt(s) you fed it.

If you make mistakes with commands in the lab, note them! Writing down what went wrong and what the correction was will significantly help your learning journey. If you cannot find a correction, it will help the TAs or myself understand what point you reached and determine some potential solutions.

Part 0 - editor in training

For this course, you will be creating and editing files in Linux. Therefore, you will need to get acquainted with at least one command line text editor. vim will be the editor used in course demonstrations.

vim

nano

Part 1 - AWS Academy Setup

An email was sent to your wright.edu account inviting you to join an AWS Academy Course for this class.

Follow the instructions in AWS Academy Setup to set up your AWS environment and make your first ssh connection to your AWS instance that you’ll use throughout the semester.

The written instructions are thorough, but if you would like more visuals visit the Pilot -> Content -> Labs -> Getting Started for a video companion guide to creating an instance. The video guide sets up connections with WSL2 specifically, but PowerShell or other Terminals will have similar key parts - know where you put your file, the name of it, and the system path to it and locate your IPv4 address to your AWS instance once created.

Wherever your lab instructions state that the exercise must be completed in your instance, it must be completed in your instance. If a lab or lab section explicitly states that you must work in your AWS environment, do so. There will be a biweekly check to make sure you are using the AWS environment to try out commands and perform work.

If you break your ability to connect to your instance by:

In the Lab Template, you will write out the where your private key file is located and the ssh command to use to remotely connect to the AWS instance.

Part 2 - Bits of permissions

For each command below, write a verbose description of what it does. Then, assess whether or not the command as given is “good” and give an explanation to defend your stance.

Sample:

  1. chmod u+r bubbles.txt
  2. chmod u=rw,g-w,o-x banana.cabana
  3. chmod a=w snow.md
  4. chmod 751 program
  5. chmod -R ug+w share

Resources

User & Group Resources

Peruse these resources before beginning work on Parts 2 & 3. You may cite them as references in your Lab Template

Part 3 - Regular bob

Perform the following exercise on your AWS instance.

Replace BOB with a username your create based on your first initial followed by last name. For example, “John Smith” would be jsmith

  1. Create a new user named BOB
    • replace BOB with your username, see instructions above
  2. What is the path to BOB’s home directory?
  3. Can ubuntu add files to BOB’s home directory? Why or why not?
    • For credit, answer must include what was to to justify answer.
  4. Switch to the user BOB
  5. Get to BOB’s home directory
  6. Can BOB add files to BOB’s home directory? Why or why not?
    • For credit, answer must include what was to to justify answer.
  7. Switch back to the ubuntu user
    • Note that the ubuntu user does not have an account password. You’ll have to find a command that can end your session…
  8. Return to the ubuntu user’s home directory

Part 4 - Get a squad

Perform the following exercise on your AWS instance.

Reminder to replace references to BOB with your username of first initial, last name (ex. jsmith)

Create a folder named share in the ubuntu user’s home directory and create some files and sub folders in the folder to play with.

  1. Create a new group named squad
  2. Add ubuntu and BOB to the squad group
    • replace BOB with your username, see instructions above
  3. Allow squad to view the ubuntu user’s home directory contents.
  4. Change permission of the share directory in the ubuntu user’s home directory so that squad is the group for the whole folder and members of squad can make changes in the folder.
    • Include all files and subdirectories in share
  5. Switch user to BOB. Test that BOB can view the contents of the ubuntu user’s home directory.
    • If not, make a note in your answer in Step 3 about additional change(s).
  6. As BOB create a file in share. Describe the full set of permissions / settings that enabled BOB to do this action.

Part 5 - sudo make me a sandwich

Perform the following exercise on your AWS instance.

  1. As the ubuntu user, in the ubuntu user’s home directory, make a file with sudo named madewithsudo.txt
  2. As the root user, in the ubuntu user’s home directory, make a file with named madewithroot.txt
  3. Describe / compare the ownership and permissions associated with madewithsudo.txt and madewithroot.txt
  4. Determine which account (root, ubuntu, and BOB) can view or edit or changes permissions to:
    • Contents inside of share
    • madewithsudo.txt
  5. Modify the permissions and ownership to make ubuntu the owner and squad the group associated with madewithsudo.txt. Give both the ability to view and edit the file.
  6. Determine why ubuntu can use sudo, but BOB cannot. Find, implement, and test a way to fix this.

Resources

Submission

Rubric

Your answers should be cleanly presented in your GitHub repository. Citations should be included as needed. Include which generative AI system was used and what prompts were used if generative AI was used.

Rubric