- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to change the default umask of root
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
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
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
тАО03-29-2010 05:46 PM
тАО03-29-2010 05:46 PM
Re: how to change the default umask of root
ksh doesn't have -S, only indirectly through the Posix shell, /usr/bin/umask.
>The umask value will be saved via a symbolic env link. Run info env to read more.
Huh? What's a symbolic env link?
umask(1) isn't part of environ(5), so won't show up with env(1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-30-2010 05:00 AM
тАО03-30-2010 05:00 AM
Re: how to change the default umask of root
Pssst (* yes it does *)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-30-2010 05:07 AM
тАО03-30-2010 05:07 AM
Re: how to change the default umask of root
$ ksh
$ umask ├в S
ksh: umask: bad format
$ /usr/bin/umask ├в S
u=rwx,g=rwx,o=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-30-2010 06:54 AM
тАО03-30-2010 06:54 AM
Re: how to change the default umask of root
Yes, that's what I said. And the latter can only display the result, not change it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2010 04:40 AM
тАО08-19-2010 04:40 AM
Re: how to change the default umask of root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2010 09:30 AM
тАО08-19-2010 09:30 AM
Re: how to change the default umask of root
Add umask ur value in /etc/profile
regards
Mc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2012 07:49 AM
тАО01-11-2012 07:49 AM
Re: how to change the default umask of root
Hi,
I need to understand where the Operating System make default permission 666 on files and 777 on directory.
Ask that because have found under a system running HP-UX 11.11 this default and on many other the default is 022. In both case no umask definition is present under .profile or /etc/profile file. This behaviour is for all users account.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2012 12:22 PM - edited тАО01-11-2012 12:22 PM
тАО01-11-2012 12:22 PM - edited тАО01-11-2012 12:22 PM
Re: how to change the default umask of root
>I need to understand where HP-UX makes default permission 666 on files and 777 on directory.
This will occur if umask is 0. The values 666 and 777 are hardcoded into the various programs that create files and directories.
>In both case no umask definition is present under .profile or /etc/profile file.
If there is no definition, it is inherited from the parent process, which maybe inetd,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2012 06:28 PM
тАО01-11-2012 06:28 PM
Re: how to change the default umask of root
The default for HP-UX (meaning as it is shipped or cold-installed) is no umask in /etc/profile or .profile. If you find umask in either of these files, it was added by the root user. To verify this, you can always look in /usr/newconfig where copies of the original files are kept. If umask is not explicitly executed, then the umask is 000 (or 00 which is the same value). umask simply removes permissions from a file or directory starting point. For files, it is 666 and 777 for directories.
The reason that files are 666 is that 777 would add the execution bit to all files, something that is undesirable and totally unnecessary. 777 files are by best definition, useless and by the worst definition, dangerous. 777 means that anyone can trash the contents of the file. Or worse, the file will be accidently run and the contents may cause very unexpected results.
For directories, 777 is also questionable although there are specific directories where this is the default. /var/tmp and /tmp are good examples. 777 means that any user can create files and directories, but worse, any user can delete any file or directory in this directory. To bring some sort of order to this chaos, most sysadmins recommend 1777 as the proper permission for /var/tmp or /tmp which prevents removal or renaming of files and directories except by the owner.
As far setting umask without editing .profile, this is an illogical request. When the shell starts (POSIX, Bourne, ksh, etc), /etc/profile is run and the settings added to the current environment. Once /etc/profile is finished (standard version) then .profile is run. So you can set umask to any value you want in /etc/profile, but it will be replaced by any umask that is in .profile. So the last step in login is .profile and that's what the shell will inherit.
Bill Hassell, sysadmin
- « Previous
-
- 1
- 2
- Next »