Chapter 3 Lab 3 SUBBY.docx-Chapter 3 Lab...
Chapter_3_Lab_3_SUBBY.docx-Chapter 3 Lab 3 Complete this
Showing 1-2 out of 2
Chapter 3 Lab 3 SUBBY.docx-Chapter 3 Lab 3 Complet...
Chapter_3_Lab_3_SUBBY.docx-Chapter 3 Lab 3 Complete this
Chapter 3 Lab 3 SUBBY.docx-Chapter ...
Chapter_3_Lab_3_SUBBY.docx-Chapter 3 Lab 3 Complete this
Page 1
Chapter 3 Lab 3
Complete this lab from your Fedora Virtual machine. Login to a terminal window with your standard
user account.
Part 1
1.
Navigate to the /tmp directory.
2.
Create two new directories in /tmp.
Name one public and the other private.
3.
In each of the two directories use the touch command to create a file. Name the file in the
public directory public and the file in the private directory private.
4.
Use ls –l to view the permissions for both files.
5.
Change the permissions of the private file so the owner has read/write/execute but no one else
has any permissions. What command did you use for this?
Chmod 700 private
6.
Use ls –l to verify that the command worked.
7.
Change the permissions of the public file so owner, group owner, and everyone else have read,
write, and execute permissions.
8.
Use ls –l to verify the permissions are correct and take a screen capture showing the permissions
of both files.
9.
Change the owner of the private file to root and the group owner of the private file to root with
the chown command. (this will require root privileges.)
10.
Aſter changing the owner make sure you are currently logged in as your standard user account,
not root, and open the private file in nano.
What happens?
I am not allowed to read the preexisng text in it and if I try to cat the file then it is obvious that
I am denied
11.
Try removing the private file with rm.
Where you able to? Anything different the usual?
Yes I was
12.
Use touch to re-create the private file if you deleted it and change the permissions back so the
owner has full read/write/execute and no one else has any.
13.
Back out of the private directory so your current working directory is /tmp
14.
Change the owner and group owner of the private directory to root.
15.
Now try to delete the private file again.
Are you able to?
What is different?
No I wasn’t because I am neither the owner or the group owner
16.
Using the numeric method change the permissions on the private directory to 770. (requires
root privledges)
17.
Switch back to your standard use account and try to use cd to go into the private directory.
Are
you able to do so? Why or why not?
No, because I have zero permissions to access the directory
18.
Switch back to the /tmp directory
19.
Create a new file called permsample.
20.
Change the permissions to 007 for permsample.
21.
Try to open permsample with nano. Are you able to edit and save the file?
NO


Page 2
22.
Change the permissions to 700.
Are you able to edit and save the file now? What is the
difference?
I am the owner where before permissions were only for everyone
23.
Switch to the root user account and try to edit the file. Are you able to? Why or Why not?
Yes, cause I am root
Part 2
1)
from your standard users home directory enter the following command to copy the services file
from /etc to your home directory: cp /etc/services services
2)
Use gzip –v to compress the file.
3)
What is the compression rao used?
Nearly 5:1 (79.5%)
4)
What is the file size of the compressed file?
140990
5)
Use gunzip –v to uncompress the file
6)
Use gzip –v -9 to compress the services folder again.
7)
What is the compression rao?
~5:1 (79.6%)
8)
What is the size of the compressed file?
140411
9)
Use gzip -d to uncompress the file.
10) Switch to your root user account using the su command
11) Create a tar archive of the /var/log directory using tar –cvf.
Save the final tar file in your
standard users home directory.
12) What is the full command you typed in?
Tar -cvf final.tar /var/log
13) What is the size of the tar file?
31,477,768
14) Extract the contents of the tar file. What command did you use?
Tar -xvf final.tar
15) Explore the contents of the unarchived directory.
Is it a full backup of the /var/log directory?
Appears to be so
16) Use tar –cvzf to archive and compress the directory again. (be sure to use a different filename)
17) What is the file size of the compressed and archived file?
2,063,741
18) What command would you need to use to unzip and unarchive the new file?
Tar -xvcf other.tar
19) Aſter you have finished all of the steps you can delete the files created in the lab.


Ace your assessments! Get Better Grades
Browse thousands of Study Materials & Solutions from your Favorite Schools
Wisconsin Indianhead Tech...
Wisconsin_Indianhead_Technical_College
School:
Linus_Operating_System
Course: