In: Computer Science
Permissions– commands and options Provide commands with screenshots.
(a) Create a new file in the root directory. What is the default permission for this file?
(b) Set the directory permission to 400. What does it mean?
(c) Set the directory permission to 100. What does it mean?
(d) Set the directory permission to 200. What does it mean?
The command to navigate to the root directory - cd /
(a)
Create a new directory in the root directory.
sudo nano myDir.txt
The default permission of the myDir directory is highlighted.
(b)
Set the directory permission to 400
sudo chmod 400 myDir.txt
The 400 permission is read-only permission for the user.
(c)
Set the directory permission to 100
sudo chmod 100 myDir.txt
The 400 permission is executable permission for the user.
(d)
Set the directory permission to 200.
sudo chmod 200 myDir
The 400 permission is writable permission for the user.