Problem

In this hands-on project, you view and change file and directory ownership using the cho...

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 (tty3) by pressing Ctrl+Alt+F3 and log in to the terminal using the user name of root and the password of secret.

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 who is the 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 root 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? Why?

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

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search