Question: OBJECTIVE: Set default permissions. DESCRIPTION: In this hands - on project, you view and manipulate the default file and directory permissions using the umask variable.

 

OBJECTIVE: Set default permissions.

DESCRIPTION: In this hands-on project, you view and manipulate the default file and directory permissions using the umask variable.

1

Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of user1 and the password of LINUXrocks!.

2

At the command prompt, type umask and press Enter. What is the default umask variable?

3

At the command prompt, type touch utest1 and press Enter. Next, type ls l at the command prompt and press Enter. What are the permissions on the utest1 file? Do these agree with the calculation in Figure 4-4? Create a new directory by typing the command mkdir udir1 at the command prompt and pressing Enter. Next, type ls l at the command prompt and press Enter. What are the permissions on the udir1 directory? Do these agree with the calculation in Figure 4-4?

4

At the command prompt, type umask 007 and press Enter. Next, type umask at the command prompt and press Enter to verify that your umask variable has been changed to 007.

5

At the command prompt, type touch utest2 and press Enter. Next, type ls l at the command prompt and press Enter. What are the permissions on the utest2 file? Do these agree with the calculation in Figure 4-5? Create a new directory by typing the command mkdir udir2 at the command prompt and pressing Enter. Next, type ls l at the command prompt and press Enter. What are the permissions on the udir2 directory? Do these agree with the calculation in Figure 4-5?

6

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 Programming Questions!