Oracle Solaris 11 Advanced System Administrator — Question 7
User jack makes use of the bash shell; his home directory is/export/home/jack.
What is the correct setting of umask, and where should it be set, to allow jack to create a shell script using the vi editor, that is executable by default?
Answer options
- A. It is not possible to make a script executable without using the chmod command.
- B. umask value of 0002 set in /etc/profile
- C. umask value of 0002 set in /export/home/jack/.bashrc
- D. umask value of 0722 set in /etc/profile
- E. umask value of 0722 set In /export/home/jack/.bashrc
Correct answer: B
Explanation
The correct umask value of 0002 allows group write permissions, which is suitable for creating an executable script by default. Setting it in /etc/profile ensures that it applies system-wide, making it effective for all users, including jack. Options A, D, and E do not meet the requirement for creating an executable script by default or set the umask incorrectly.