wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Understanding Linux File Permissions

Total questions: 20

Worksheet time: 13mins

Name
Class
Date
1.

What does the 'r' permission stand for in Linux file permissions?

a)

Rename

b)

Read

c)

Run

d)

Remove

2.

Which command is used to change file permissions in Linux?

a)

chown

b)

chmod

c)

chgrp

d)

chperm

3.

In the octal representation of permissions, what does the number '7' represent?

a)

Read and write

b)

Read, write, and execute

c)

Write and execute

d)

Execute only

4.

If a file has permissions set to 644, what permissions does the group have?

a)

Read and write

b)

Read only

c)

Write only

d)

Execute only

5.

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?

a)

chmod 640 filename

b)

chmod 750 filename

c)

chmod 644 filename

d)

chmod 600 filename

6.

Explain the significance of the three sets of permissions in Linux file systems.

a)

They determine the file size.

b)

They control who can read, write, or execute the file.

c)

They define the file type.

d)

They set the file's creation date.

7.

A file has permissions set to 755. What does this mean for the 'others' category?

a)

No permissions

b)

Read and execute

c)

Read, write, and execute

d)

Write and execute

8.

Why might a system administrator choose to set a directory's permissions to 700?

a)

To allow everyone to access the directory

b)

To restrict access to only the owner

c)

To allow group members to modify the directory

d)

To make the directory read-only for everyone

9.

Given a scenario where a file needs to be shared with a group but not modified, which permission setting would be most appropriate?

a)

777

b)

755

c)

644

d)

600

10.

How would you verify the current permissions of a file named 'document.txt'?

a)

ls -l document.txt

b)

chmod document.txt

c)

chown document.txt

d)

chgrp document.txt

11.

Which chmod command sets the "other" permissions on a file to read, write, and execute?

a)

A) chmod 776 file

b)

B) chmod 777 file

c)

C) chmod 775 file

d)

D) chmod 774 file

12.

Change permissions of a file in Linux

a)

chown

b)

chgrp

c)

chmod

d)

chperm

13.

What does the command su - do when executed in a terminal?

a)

A. Switches to the root user without changing the current directory.

b)

B. Switches to the root user and changes to the root user's home directory.

c)

C. Switches to the specified user without changing the current directory.

d)

D. Switches to the specified user and keeps the environment variables unchanged.

14.

Which chmod command sets the "other" permissions on a file to read, write, and execute?

a)

A) chmod 776 file

b)

B) chmod 777 file

c)

C) chmod 775 file

d)

D) chmod 774 file

15.

Change permissions of a file in Linux

a)

chown

b)

chgrp

c)

chmod

d)

chperm

16.

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)  

17.

Fill in the command below to set the file to have no permission.

chmod ??? happy.txt

(a)  

18.

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)  

19.

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)  

20.

Fill in the command below to set the file to execute only by the owner of the file.

chmod ??? happy.txt

(a)