1844320 Members
3674 Online
110230 Solutions
New Discussion

umask

 
Indrajit_1
Valued Contributor

umask

Hi;

how do i set umask to 022 for independent user without changing it to /etc/default/login file. i have chage it to $HOME/.login file, but when i ssh to another machine, it takes default from the file /etc/default/login. How do i resolve this issue?

What if i change umask to 022 in /etc/default/login ?? will it effect the existing setting?? Help me..


Cheers
Indrajit
Never Ever Give Up
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: umask

You have to change the umask for this user on EACH machine the user may login to. Setting the umask on one machine has no effect on another machine.

Muthukumar_5
Honored Contributor

Re: umask

We can not change default setting of umask to 022. IT has to be done with profile settings with /etc/profile or $HOME/.profile file only.

If you want to have that setting just add one line of,

umask 022

in /etc/profile which will give that setting to all users in that machine.

--
Muthu
Easy to suggest when don't know about the problem!
Frank de Vries
Respected Contributor

Re: umask

Umask can be set at at 3 levels
globally, user and script
Globally in the /etc/default/login or /etc/profileand can subsequently be set on user level in its /home/user/.profile
or you can script the umask command in
the beginning of a shell script , so it
is only valid for that script session.

Look before you leap
Frank de Vries
Respected Contributor

Re: umask

Umask can be set at at 3 levels
globally, user and script
Globally in the /etc/default/login or /etc/profile and can subsequently be set on user level in its /home/user/.profile
or you can script the umask command in
the beginning of a shell script , so it
is only valid for that script session.

Look before you leap
Indrajit_1
Valued Contributor

Re: umask

Hi;

i have tried with chaning $HOME/.profile, but it doesn't work.

When i user login in one machine to another through ssh, if he type umash in command prompt (i.e #umask), it shows 027. i wanted to set umask for independent user, not globally.


Cheers
Indrajit
Never Ever Give Up
DCE
Honored Contributor

Re: umask



When you changed the umask in $HOME/.profile for the user did you remember to export it as well?
Indrajit_1
Valued Contributor

Re: umask

Hi All;


Let me find, if there is some other issue...


Thanks for ur support..



Cheers
Indrajit

Never Ever Give Up