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 101-500 topic 1 question 82 discussion

Actual exam question from LPI's 101-500
Question #: 82
Topic #: 1
[All 101-500 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. 0227
  • E. 0027
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
dlus
Highly Voted 3 years, 8 months ago
umask 027: dirs 750, files 640
upvoted 8 times
...
NeoSam999
Most Recent 1 year, 2 months ago
Selected Answer: E
Default permissions: 777 = default permissions for directories 666 = default for files Default umask: 0002 To change umask: ~$ umask 027 ~$ umask 0027 To check new files have the default permissions -rw-r----- ~$ touch umask-test ~$ ls -l umask-test -rw-r----- 1 neo neo 0 Jan 1 18:01 umask-test Easy explanation: r = 4 w = 2 x = 1 Files with default 002: 666 - 022 = 644 Files with default 027: 666 - 027 = 644 0 = user / 2 = Group / 7 = Others Files: 666 - 027 = 640 = -rw-r-----
upvoted 2 times
NeoSam999
1 year, 2 months ago
Correction: Files with default 027: 666 - 027 = 640
upvoted 2 times
...
...
blk_542
1 year, 4 months ago
0027: Initial 0: ignored second 0: rw for files (rwx for directories) 2: r for files (rx for directories) 7: nothing (for both files and directories)
upvoted 2 times
...
CuriousLinuxCat
2 years, 9 months ago
Closest I can get it to is 026.
upvoted 2 times
...
amwangi
2 years, 9 months ago
this answer is available coz its 0026
upvoted 1 times
...
Jcob
3 years, 1 month ago
Hang on but why it isnt 0137? I though since chmod RW-R---- is 640 I would guess it would be when eliminating the numbers 0/7/7/7 -0/6/4/0 0/1/3/7 can someone explain please?
upvoted 2 times
K1lroy
3 years, 1 month ago
I believe it is because files are by default rw- without x. So you don't need to take the 1 away
upvoted 2 times
...
...
mentor84
3 years, 10 months ago
Why not 0026? isn't these files with starting permissions of 666?
upvoted 4 times
jobwongdavila
3 years, 9 months ago
that's not a valid value for umask since it applies for directories as well
upvoted 3 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 ...