Exercises
Test your understanding of Linux file permissions with this quiz on chmod, chown, rwx notation, numeric permission modes, file ownership, groups, directories, and sticky bits. Explore how permissions control read, write, and execute access for users, groups, and others. Questions cover commands for changing permissions and ownership, the meaning of 644, directory file-type symbols, removing group execute access, and how the sticky bit protects files in shared directories. Ideal for Linux beginners, system administrators, and anyone building command-line skills.
Answer the questions below and check the explanation for each answer.
0/8 answered
Auto audio on: the next questions will be read aloud when you click Continue.
The chmod command in Unix/Linux is used to change the permissions of a file or directory. It allows you to set who can read, write, or execute the file.
The 'rwx' in Linux file permissions stands for read, write, and execute. These are the three types of permissions that can be granted for files and directories. Read allows viewing file content, write allows editing, and execute permits running the file as a program.
The notation 'u=rwx' in file permissions corresponds to User/owner. The 'u' stands for user, and 'rwx' indicates that the user/owner has read, write, and execute permissions. Thus, the permissions are specifically applied to the owner of the file.
In Linux file permissions, the symbol that represents a directory is d. This character is displayed as the first symbol in the permissions string when you list files using the ls -l command. It indicates that the file being referred to is a directory. Other symbols include - for regular files and l for symbolic links.
In Unix-like systems, chmod is used to change the permissions of a file. The option g-x specifically removes execute permissions from the group (g) for the specified filename. Thus, the correct command is chmod g-x filename.
In a Linux system, the permission 644 indicates: 6 (4 + 2) represents read and write permissions for the owner, 4 represents read permissions for the group, and 4 represents read permissions for others. Therefore, the correct option is: Read and write for owner, read for group and others.
In the command chown user:group filename, the user:group specifies changing the file ownership: user sets the user ownership, and group sets the group ownership. Therefore, this command changes the file's ownership to the specified user and group to the specified group. This aligns with option 2, changing ownership to user and group to group.
The sticky bit on a directory ensures that only the owner of a file, the owner of the directory, or the root user can delete or rename files within that directory. This is commonly applied in /tmp directories to prevent users from deleting each other’s files. It does not affect read-only status or the order of directory listings.

Free CourseOperating Systems and Systems Programming
38h48m
26 exercises

Free CourseOperating System
16h53m
42 exercises

Free CourseHome Networking 101
1h50m
4 exercises

Free CourseBasic Commands in Linux
2h15m
6 exercises

Free CourseComputer operating systems
6h00m
23 exercises

Free CourseHardware and Network full course
20h08m
23 exercises

Free CourseLinux command line tutorial
25h01m
40 exercises

Free CourseUbuntu Linux training
4h06m
33 exercises
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks