XK0-005 · Question #1253
XK0-005 Question #1253: Real Exam Question with Answer & Explanation
The correct answer is C: umask 2002. The error "Octal number out of range" occurs because the umask command expects a valid octal number between 0 and 777. The value 2002 is outside this valid range for setting file permissions.
Question
The following represents a partial listing of a user's .bashrc file: HISTSIZE=800 HISTFILESIZE=1000 umask 2002 HISTCONTROL=ignoreboth When the user opens a terminal, an error message appears: Octal number out of range Which of the following lines in the partial .bashrc should be modified to prevent the error from occurring?
Options
- AHISTSIZE=800
- BHISTFILESIZE=1000
- Cumask 2002
- DHISTCONTROL=ignoreboth
Explanation
The error "Octal number out of range" occurs because the umask command expects a valid octal number between 0 and 777. The value 2002 is outside this valid range for setting file permissions.
Common mistakes.
- A.
HISTSIZE=800sets the number of commands to remember in the history list;800is a valid decimal integer for this variable and does not cause an octal error. - B.
HISTFILESIZE=1000sets the maximum number of lines contained in the history file;1000is a valid decimal integer for this variable and does not cause an octal error. - D.
HISTCONTROL=ignorebothsets a variable that controls how commands are saved in the history list; it takes a string value and does not involve octal numbers.
Concept tested. Linux umask command and octal permissions
Reference. https://man7.org/linux/man-pages/man1/umask.1.html
Topics
Community Discussion
No community discussion yet for this question.