- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- default umask
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:26 AM
тАО11-19-2001 07:26 AM
Re: default umask
It's not, other than "000". You should establish the default you want in /etc/profile and/or in $HOME/.profile.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:27 AM
тАО11-19-2001 07:27 AM
Re: default umask
Why do you need that? Typing
umask
or
umask -S
displays the mask for you. I don't know why you need to know where it is stored in HP/UX... any more information please?
Vince
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:27 AM
тАО11-19-2001 07:27 AM
Re: default umask
Here is a link on umask. I don't think there is a standard umash on hp-ux for all applications, login etc.
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90680/B2355-90680_top.html&con=/hpux/onlinedocs/B2355-90680/00/03/362-con.html&toc=/hpux/onlinedocs/B2355-90680/00/03/362-toc.html&searchterms=umask&queryid=20011119-073012
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:28 AM
тАО11-19-2001 07:28 AM
Re: default umask
umask is set in /etc/profile. That umask can then be overridden by setting it again in the user's .profile. Finally, you can override that at the command line using the umask command (though it will only be changed for that process).
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:34 AM
тАО11-19-2001 07:34 AM
Re: default umask
It's been a long time since i did a fresh O/S install, but iirr, the default is nothing i.e 000.
You would need to set it system wide in /etc/profile- > umask xyz
and to override it for individual users, you set it in their .profile file.
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:39 AM
тАО11-19-2001 07:39 AM
Re: default umask
I know I can set it in profiles or on command line. But the default 000 must be set somewhere on the system, before being over ridden by the value in /etc/profile or $HOME/.profile.
The default on trusted systems is 077 (or 07077 to be precise) where is this configured for example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:43 AM
тАО11-19-2001 07:43 AM
Re: default umask
It is a good practice to set it to 002 or 022 in /etc/profile so that files are not wide open by default for all users, then set it individually per user in their .profile if they something different. Actually what you set it to depends on your situation. I've seen this set to 077 as well so only the user could access his/her files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 07:58 AM
тАО11-19-2001 07:58 AM
Re: default umask
umask is a shell environment variable and like
any variable if it is not set, it has no value and is taken as 000. When a file
is created it's default permissions as per
the open system call would be 777; this
is subtracted from the umask setting and the resulting permission will be the actuall file permission setting. So, if the umask is not set, the permission will always be 777.
<
I think , when you make a system trusted,
it adds the umask entry to the /etc/profile file!!
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 08:45 AM
тАО11-19-2001 08:45 AM
Re: default umask
>umask is a shell environment variable and
>like any variable if it is not set, it has no
>value and is taken as 000.
If it was an unset shell variable it would have a null value such as " ", rather than "000". Wouldn't it?
>I think , when you make a system trusted,
>it adds the umask entry to the /etc/profile
>file!!
No, it doesn't!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 09:02 AM
тАО11-19-2001 09:02 AM
Re: default umask
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 09:29 AM
тАО11-19-2001 09:29 AM
Re: default umask
>like any variable if it is not set, it has no
>value and is taken as 000.
<<
No. This value is slightly different from the usual shell variable settings. As far as i know, that's because the file creation system calls, invoke umask system call to get the current umask setting.
THe umask system call is always sucessful
i.e, it no value is set it returns 0 and if the umask is set, it returns the umask value. So either case, the output is either a 0 or a umask value.
>I think , when you make a system trusted,
>it adds the umask entry to the /etc/profile
>file!!
<
Umm, intresting. I need to look into my trusted systems. Will post back , if i find something.
-raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 09:55 AM
тАО11-19-2001 09:55 AM
Re: default umask
It is a very good idea to set umask explicitly in /etc/profile AND /etc/csh.login so you know exactly what each user will get. Similarly, set umask for ftpd in /etc/inetd.conf.
Finally, when writing scripts for cron or other batch operations, never assume that umask is safe...set it at the beginning of the script. umask 077 is best for anything run by root. Then in your script, loosen the permissions on specific files when needed.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2001 11:48 AM
тАО11-19-2001 11:48 AM
Solution"umask" is kernel parameter (and has always been ;-). There is a shell-builtin command "umask", of course, but this is only useful for *changing* it, the original value comes from the kernel, or - in rare cases, like "ftpd" - from the daemon's setup.
For shells it might be fine to set it "/etc/profile" and "/etc/cshrc", but what about CDE (X-Windows) and other daemons?
So, you might consider setting "umask" in each daemon's rc-script prior to starting the daemon process. To not influence something else enclose everything in parentheses like here:
( umask 027; /usr/lib/lpsched && echo ...; )
( umask 077; /usr/sbin/inetd -k; )
Some rc-scripts already do this, like "inetd", "net", and "syslogd", but other not (like "lp", "cron").
Just my ???0.02,
Wodisc