Chmod Exercises

chmod Practice

Create a new file called chmod.exercises.

Question: What are the default permissions for the new file?

CLICK FOR ANSWER

Bonus Question: What was the command to view the file permissions?

CLICK FOR ANSWER

Change chmod.exercises permissions to -r--r--r--

Change the file permissions to Read only for the owner, group and all other users.

Question: What was the command for changing the file permissions to -r--r--r--?

CLICK FOR ANSWER

Change chmod.exercises permissions to -rw-r-----

Change the file permissions to match the following:

  • owner: Read and Write
  • group: Read
  • other: no permissions (None)

Question: What was the command for changing teh file permissions to -rw-r-----?

CLICK FOR ANSWER

Change chmod.exercises permissions to -rwxr-x--x

Change the file permissions to match the following:

  • owner: Read, Write and Execute
  • group: Read and Execute
  • other: Execute

Question: What was the command for changing the file permissions to -rwxr-x--x?

CLICK FOR ANSWER
Note

After completing the exercises feel free to delete the chmod.exercises file.