1753971 Members
7777 Online
108811 Solutions
New Discussion юеВ

Re: how to set umask

 
arun m govind
Frequent Advisor

how to set umask

Hi,

I had created a user with /bin/false shell.Now I want to set umask for that user.How can i set??????
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: how to set umask

Shalom,

The user has a file called .profile

umask 022

Or whatever setting you want in that file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
arun m govind
Frequent Advisor

Re: how to set umask

hi,

if i set umask in .profile is it applicable for ftp means in ftp .profile is executed ???????
IT_2007
Honored Contributor

Re: how to set umask

.profile will be executed only when user logged in. Since you are setting for FTP access only, user won't be able to login because shell is false.
Peter Godron
Honored Contributor

Re: how to set umask

Arun,
you could set the umask system wide in inetd.conf with -u .

for settting up user:
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1043408

Why do you use all the exclamation marks on your questions ? Are they not being answered quick enough ;-)
James R. Ferguson
Acclaimed Contributor

Re: how to set umask

Hi:

SInce you are not allowing a login session and since you have not substituted a program in lieu of a standard shell, you will need to call 'umask(2)' in your C-code program; or use 'sysopen' with a permissions argument in Perl.

Otherwise, if the account is only for FTP, consider setting a default 'umask' for the 'ftp' daemon in 'etc/inetd.conf' (see the manpages for 'ftpd(1M)'). You might wish to allow or deny the use of 'umask' in the 'ftpaccess(4)' file too.

Regards!

...JRF...
Sp4admin
Trusted Contributor

Re: how to set umask

Arun,

You can set the umask in the users .profile.


sp,
dipesh_2
Regular Advisor

Re: how to set umask

hi

u can set umask in user's .profile file
add an entry at bottom umask 022


dipesh
Dennis Handly
Acclaimed Contributor

Re: how to set umask

>dipesh: You can set umask in user's .profile file

I'm not sure how your reply is better than the incorrect reply from sp. Note that the shell is /usr/bin/false and this is for ftp.
Basheer_2
Trusted Contributor

Re: how to set umask

Arun,

Since you didn't speecify, if this is a HPUX or Linux.

In Linux, you have a config file, there you can control umask values.