Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam LFCS topic 1 question 97 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 97
Topic #: 1
[All LFCS Questions]

Which of the following settings for umask ensures that new files have the default permissions -rw-r----- ?

  • A. 0017
  • B. 0640
  • C. 0038
  • D. 0027
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
rona962
11 months, 2 weeks ago
The correct setting for umask to ensure that new files have the default permissions -rw-r----- is option D, 0027. Explanation: The umask command is used to set the default file creation permissions for new files and directories. It works by subtracting the umask value from the maximum permissions allowed. The default permissions for files are 666 in octal (rw-rw-rw-), and the default permissions for directories are 777 in octal (rwxrwxrwx). To achieve -rw-r----- for new files, we need to subtract 027 (binary 000 010 111) from the default file permissions 666 (binary 110 110 110). The result of this subtraction is 640 (binary 110 100 000) in octal notation. Therefore, to ensure that new files have the default permissions -rw-r-----, the umask value should be set to 0027.
upvoted 1 times
...
sedwipe
3 years, 7 months ago
I don't agree, to determine the umask you should do: 0777-0027=0750 which is not reflecting the actual answer.
upvoted 1 times
jjnicks
3 years, 3 months ago
It is correct for file. Dir is 777- mask, file is 666-mask. A 7 in umask means no permission. Umask 0027 is 750(dir) and 640(file).
upvoted 4 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...