Linux File Permissions & Environment Variables – Full Quiz
← Back to File Permissions & Environment Variables
← Back to Linux Commands
← Back to Quiz Home
This quiz contains 20 questions covering Linux file permissions and environment variables.
It helps DevOps engineers understand security, access control, and runtime configuration on Linux systems.
Which permission allows reading a file?
The r (read) permission allows opening and viewing the contents of a file.
Which permission allows modifying a file?
The w (write) permission grants the ability to modify, overwrite, or delete a file's content.
Which permission allows executing a file?
The x (execute) permission allows a file to be run as a program or script.
In file permissions, what does the first character - indicate?
In the ls -l output, a hyphen - as the first character indicates a standard file.
What does the permission string drwxr-xr-x represent?
The leading d indicates that the item is a directory.
Which numeric value represents read permission?
In the octal permission notation, 4 stands for read permission.
Which numeric value represents write permission?
In the octal permission notation, 2 stands for write permission.
Which numeric value represents execute permission?
In the octal permission notation, 1 stands for execute permission.
What does chmod 600 file.txt mean?
600 means User: rw- (4+2=6), Group: --- (0), Others: --- (0).
What does chmod 755 file.sh allow?
755 means User: rwx (7), Group: r-x (5), Others: r-x (5).
Which command changes file ownership?
The chown (change owner) command is used to change the file owner and group.
Which command changes only the group ownership?
chgrp is specifically designed to change the group ownership of a file or directory.
Which option with chown applies ownership recursively?
The -R flag applies the ownership change to the directory and all files/subdirectories inside it.
Which command prints all environment variables?
The env command (or printenv) lists all current environment variables.
Which command prints a single environment variable?
Using echo with $VARIABLE_NAME prints the value of that specific variable.
Which command exports a shell variable to child processes?
The export command makes a variable available to child processes created from the shell.
Which file permission allows entering a directory?
The execute (x) permission on a directory is required to cd into it or access files within it.
Which command displays environment variables in key=value format?
printenv prints the values of the specified environment variables or all of them if no name is specified.
Which command is used to view the current PATH?
echo $PATH displays the list of directories that the shell searches for executable files.
Which permission setting prevents others from accessing a file?
600 gives read/write to the owner and no permissions (0) to group and others, effectively blocking access.
Quiz Progress
0 / 0 questions answered
(0% )
0 correct
Quiz Complete!
0%
Reset quiz
📩 Get weekly DevOps quizzes & guides
📬 Weekly DevOps, Cloud & Gen AI quizzes & guides