Question: Project 4 - 9 ESTIMATED TIME: 1 5 minutes OBJECTIVE: Set file and directory ownership. DESCRIPTION: In this hands - on project, you view and

Project 4-9
ESTIMATED TIME: 15 minutes
OBJECTIVE: Set file and directory ownership.
DESCRIPTION: In this hands-on project, you view and change file and directory ownership using the chown and chgrp commands.
1
Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of root and the password of LINUXrocks!.
2
At the command prompt, type touch ownersample and press Enter. Next, type mkdir ownerdir at the command prompt and press Enter. Next, type ls l at the command prompt and press Enter to verify that the file ownersample and directory ownerdir were created and that root is the owner and group owner of each.
3
At the command prompt, type chgrp sys owner* and press Enter to change the group ownership to the sys group for both ownersample and ownerdir. Why were you successful?
4
At the command prompt, type chown user1 owner* and press Enter to change the ownership to the user1 user for both ownersample and ownerdir. Why were you successful?
5
At the command prompt, type chown root.root owner* and press Enter to change the ownership and group ownership back to the root user for both ownersample and ownerdir. Although you are not the current owner of these files, why did you not receive an error message?
6
At the command prompt, type mv ownersample ownerdir and press Enter. Next, type ls lR at the command prompt and press Enter to note that the ownersample file now exists within the ownerdir directory and that both are owned by root.
7
At the command prompt, type chown R user1 ownerdir and press Enter. Next, type ls lR at the command prompt and press Enter. Who owns the ownerdir directory and ownersample file?
8
At the command prompt, type rm -Rf ownerdir and press Enter. Why were you able to delete this directory without being the owner of it?
9
Type exit and press Enter to log out of your shell.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!