A system administrator sets the default umask for a user to 0027. If the user creates a new file and a new directory, what will be their octal permissions?
The correct answer is that the directory will have 750 permissions and the file will have 640 permissions.
The umask utility works by removing permissions from the system's default values when a new file or directory is created. In Linux, the default permission for a new directory is 777 (rwxrwxrwx), and the default for a new file is 666 (rw-rw-rw-).
To find the resulting permissions, the umask value is subtracted from the default value for each type:
Other: 6 (rw-) - 7 (rwx) = 0 (---) (Since write and execute are already 0 for 'other', only read is removed, but the subtraction still results in 0)
Result: rw-r----- or 640
The other options are incorrect because they result from common mistakes, such as using the wrong default values or applying the mask incorrectly.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a umask, and how does it work in Linux?
Open an interactive chat with Bash
Why do files have a default permission of `666` instead of `777`?
Open an interactive chat with Bash
How do you change the default umask value for a user?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access