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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .