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.
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 5 times
...
...
Log in to ExamTopics
Sign in:
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.
rona962
2 months, 3 weeks agosedwipe
2 years, 10 months agojjnicks
2 years, 6 months ago