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?

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?

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?

A.
umask value of 0002 set in /etc/profile

B.
umask value of 0722 set In /export/home/jack/.bashrc

C.
umask value of 0002 set in /export/home/jack/.bashrc

D.
It is not possible to make a script executable without using the chmod command.

E.
umask value of 0722 set in /etc/profile



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Ebbing

Ebbing

Answer is D.
It is not possible to make a script executable.

Because the default file permission is calculated by subtracting the umask from the base permission set. And Base permission for file is 666 and for directory is 777.

So the maximum permission you can give is by umask 000 which will give the newly created file 666,i.e read/write permission for the owner, group, and other (rw-rw-rw-)