Font size
WorksheetsUnderstanding Linux File Permissions
Total questions: 20
Worksheet time: 13mins
What does the 'r' permission stand for in Linux file permissions?
Rename
Read
Run
Remove
Which command is used to change file permissions in Linux?
chown
chmod
chgrp
chperm
In the octal representation of permissions, what does the number '7' represent?
Read and write
Read, write, and execute
Write and execute
Execute only
If a file has permissions set to 644, what permissions does the group have?
Read and write
Read only
Write only
Execute only
How would you change the permissions of a file to allow the owner to read and write, the group to read, and others to have no permissions using chmod?
chmod 640 filename
chmod 750 filename
chmod 644 filename
chmod 600 filename
Explain the significance of the three sets of permissions in Linux file systems.
They determine the file size.
They control who can read, write, or execute the file.
They define the file type.
They set the file's creation date.
A file has permissions set to 755. What does this mean for the 'others' category?
No permissions
Read and execute
Read, write, and execute
Write and execute
Why might a system administrator choose to set a directory's permissions to 700?
To allow everyone to access the directory
To restrict access to only the owner
To allow group members to modify the directory
To make the directory read-only for everyone
Given a scenario where a file needs to be shared with a group but not modified, which permission setting would be most appropriate?
777
755
644
600
How would you verify the current permissions of a file named 'document.txt'?
ls -l document.txt
chmod document.txt
chown document.txt
chgrp document.txt
Which chmod command sets the "other" permissions on a file to read, write, and execute?
A) chmod 776 file
B) chmod 777 file
C) chmod 775 file
D) chmod 774 file
Change permissions of a file in Linux
chown
chgrp
chmod
chperm
What does the command su - do when executed in a terminal?
A. Switches to the root user without changing the current directory.
B. Switches to the root user and changes to the root user's home directory.
C. Switches to the specified user without changing the current directory.
D. Switches to the specified user and keeps the environment variables unchanged.
Which chmod command sets the "other" permissions on a file to read, write, and execute?
A) chmod 776 file
B) chmod 777 file
C) chmod 775 file
D) chmod 774 file
Change permissions of a file in Linux
chown
chgrp
chmod
chperm
Fill in the command below to set the file to read only by the owner and the group students setup by Mr. Cusack.
chmod ??? happy.txt
(a)
Fill in the command below to set the file to have no permission.
chmod ??? happy.txt
(a)
Fill in the command below to set the file to write only by the owner of the file and read only for anyone else.
chmod ??? happy.txt
(a)
Fill in the command below to set the file to read, write, and execute only by the owner of the file.
chmod ??? happy.txt
(a)
Fill in the command below to set the file to execute only by the owner of the file.
chmod ??? happy.txt
(a)
