Lab (3) - System Security and Administration

Before you start working on this lab, you need to open two screens on student machine. You need to create a text file to save your answers in the file and send the file as an e-mail attachment to Your file should have YOUR NAME on its first line. The Subject line MUST say Lab (3). I will deduct 10 points for each of the labs with missing names or wrong Subject Line.

Q1. What does > ls -la do?

Q2. Suppose, you are currently in directory: /home/mthomas/bin. Show two different ways you can go to directory: /home/mthomas/my_stuff.

Q3. The File Permission Mode on a Unix file signifies four things. What are those four things?

Q4. The single left most segment of the File Permission Mode indicates the file type. What are different flags used in that segment and what do they mean?

Q5. Consider the following example to answer the questions (a to i):
drwxr-xr-x 17 rt web 4096 Jun 5 2007 class.html

a) What is the name of the file?
b) Who is the owner of this file?
c) To which group it belongs?
d) What is the size of the file in byte?
e) When was the file last modified?
f) What is the type of the file?
g) What are the permissions to the owner of the file?
h) What are the permissions to the group it is belong to?
i) What are the permission to the others?

Q6. What are the permissions to the owner, group, and the world in the following example.
drwxr-xr-x 17 root root 4096 Jun 5 2007 apache2
What is the command that is used to change the file permission mode?
Write the command to change the permission on the above file to Read, Write, and Execute to the Owner and Group and no permission to others.

Q7. What is most appropriate file permission for a file, myFile, where the owner and group can view and modify the file, but cannot execute it and the world could only view it. Write the command to set this permission.

Q8. What is the command used to copy one file to another? Show by one example using myFile on how it is used.

Q9. What is the command to rename a file to another? Show by an example.

Q10. What is the command to delete a file? Show by an example using the copy of myFile you just made.

Q11. What is the difference between hard links and soft links?

Q12. Create a hard link called hlinkUnix to the file unixInfo.

Q13. Give examples when the use of links, either one, will make life easier.

Q14. What is a process on a Unix OS? Can two programs with the same name be run by the same user on the same Unix machine? If yes, how can we distinguish one from another?

Q15. Find out what Shell you are using on STUDENT machine.

Q16. How would you check on the status of the processes that are running on your Unix system, in your case on STUDENT machine?

Q17. What does the command ps with flag -eaf ( > ps -eaf ) provide?

Q18. Suppose you have started a process but later you decide to terminate it. How will you terminate a process?

Q19. How will you start a process in the background?

Q20. What does command pstree do?