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.
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

Explanation:
The user file-creation mode mask (umask) is use to determine the file permission for
newly created files. It can be used to control the default file permission for new files. It is a four-digit octal number.
You can setup umask in /etc/bashrc or /etc/profile file for all users. By default most Unix distro set
it to 0022 (022) or 0002 (002).
In short,



Leave a Reply 12

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


Reborn

Reborn

R this questions valid?

Richie

Richie

correct is : A ; The new file wouldn’t be executable – so you have to use chmod
-rw-rw-rw- 1 root root 0 Oct 16 11:33 umask_0000
-rw-rw-r– 1 root root 0 Oct 16 11:31 umask_0002
-rw–w—- 1 root root 0 Oct 16 11:35 umask_0146
-r–r–rw- 1 root root 0 Oct 16 11:34 umask_0220
–w——- 1 root root 0 Oct 16 11:35 umask_0467
—-r–r– 1 root root 0 Oct 16 11:31 umask_0722
———- 1 root root 0 Oct 16 11:32 umask_0777

Ali

Ali

Richie please could u help me I need your help

best regards

Ali

Andrea

Andrea

Hi Ali

Can you contact Richie?

Thanks in advance

Marek

Marek

I agree with Richie, file is created with default 666 mode, so umask 0002 result in 664 permission

John

John

Definitely A. The permissions would not create an executable file anyway so chmod would be required, not umask.

Mir

Mir

“A” is valid according to question.. bcz file have no execute permission. so that’s why no 777…..

Saeed

Saeed

A is obviously correct answer.

BSD Bandit

BSD Bandit

A, when you create a file, it will not be executable, even if you change the /etc/profile to 0002

Tsuyoshi

Tsuyoshi

Hi!

Passed Oracle Solaris 11 Administration 1Z0-821 exam with a good score of 90% (the passing line is 64% now)!

Got 70 questions in total, and questions were on:
1. Installing Oracle Solaris 11 using an Interactive Installer
2. Administering Services
3. Setting Up and Administering Data Storage
4. Administering Oracle Solaris Zones
5. Setting Up and Administering User Accounts
6. Controlling Access to Systems and Files
(New) 7. Managing the SYSLOG facilityManaging the CRON facility
(New) 8. Managing the SYSLOG facility

Pay attention to the up 7 & 8 topics when preparing for the 1Z0-821 exam. Questions on those two topics are not available on this site.

And, you can refer to the most valid 1Z0-821 dumps (2017 version) here:

http://www.oraclebraindump.com/?s=1Z0-821

(Those questions are part of PassLeader 1Z0-821 dumps, recommend to get its full version 1Z0-821 dumps with VCE and PDF.)

Good Luck!