NEW BRUNSWICK COMPUTING SERVICES
HELP DESK GROUP

Basics Of The UNIX Operating System
Exercise 3

Working with File Permissions

This practice will familiarize you with how UNIX permissions work. This practice will also generate error messages to familiarize you with what file permission error messages look like.

  1. View the file "README.1", using the command "cat". What message did you get?


  2. View the file "README.2", using the command "cat". What message did you get?


  3. cd into the NoWrite directory. Create a new file, named try.me, using the command
    touch try.me
    What happened and why?


  4. Use cd to go back up one level to UNXclass. What is one command that will change the permissions on the NoWrite directory to allow the creating of files.


  5. Run the command runMe.1 by typing ./runMe.1 . What did it print out? What are its permissions?


  6. Run the command runMe.2 by typing ./runMe.2 . What did it print out? What are its permissions?


  7. Permission practice- change the following files, which currently have no permission settings, to have the specified permissions (use chmod with either symbolic or numeric permission specs and use ls to check your success):
    File Permissions Command needed
    pp1 rwxrwxrwx
    pp2 rwxrwxr-x
    pp3 rwxr-xr-x
    pp4 r-x------
    pp5 r--r-----
    pp6 rw-r--r--
    pp7 r--r--r--
    pp8 rw-rw-rw-
    pp9 rwx------


  8. Set up the foundation for a web page - NOTE If you have already created a web page actually do only steps A, E and H to verify the settings, write down the answers for the other steps
    Action Command Needed
    A. Change to your home directory
    B. Make a directory named public_html
    C. Allow group and others to be able to read and execute on your home directory
    D. Allow group and others to be able to read and execute on the public_html directory
    E. Verify the permissions on your home directory and on public_html
    F. Use touch to create an empty file named index.html in the public_html directory
    G. Allow group and others to be able to read all files in the public_html directory
    H. Verify the permissions on the file(s) in public_html (your home page files)

    The previous will set up the basic directories, files, and permissions needed for a web page. The actual development of a web page is another project altogether.

  9. Optional: Restore the original startup settings to your account.
After attempting the above look here for answers

End of Practice 3 - Working with File Permissions