HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Unable to set umask for a user! - HELP!
Operating System - HP-UX
1830939
Members
2764
Online
110017
Solutions
Forums
Categories
Company
Local Language
back
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
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-27-2001 02:41 AM
11-27-2001 02:41 AM
Whenever I create new user (using SAM) this user is unable to set the umask properly. Every user on the system has the wrong umask, and I'm unable to set it.
My situation:
- HPUX 11.0
- umask 644 in .profile of all users
- but every file I create has permissions -----w--w- (022)
- also in /etc/skel/.profile the umask is 644.
I use ksh as default shell.
Anyone any idea what I'm doing wrong??
Regards,
Pim Bliek
My situation:
- HPUX 11.0
- umask 644 in .profile of all users
- but every file I create has permissions -----w--w- (022)
- also in /etc/skel/.profile the umask is 644.
I use ksh as default shell.
Anyone any idea what I'm doing wrong??
Regards,
Pim Bliek
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2001 02:48 AM
11-27-2001 02:48 AM
Solution
Do you want the files to be created with permissions 644?
In that case, set the umask to 022 in the user's .profile.
From the man page:
"For example, the mask u=rwx,g=rx,o=rx ( 022 ) disables group and other
write permissions. As a result, files normally created with a file mode shown by the ls -l command as -rwxrwxrwx ( 777 ) become mode -rwxr-xr-x ( 755 ); while files created with file mode -rw-rw-rw- ( 666 become mode -rw-r--r-- ( 644 )."
In that case, set the umask to 022 in the user's .profile.
From the man page:
"For example, the mask u=rwx,g=rx,o=rx ( 022 ) disables group and other
write permissions. As a result, files normally created with a file mode shown by the ls -l command as -rwxrwxrwx ( 777 ) become mode -rwxr-xr-x ( 755 ); while files created with file mode -rw-rw-rw- ( 666 become mode -rw-r--r-- ( 644 )."

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2001 02:49 AM
11-27-2001 02:49 AM
Re: Unable to set umask for a user! - HELP!
Hi,
I think you want to have files with 644 permissions. So you should use umask=022
See man umask.
Fr??d??ric
I think you want to have files with 644 permissions. So you should use umask=022
See man umask.
Fr??d??ric
Crime doesn't pay...does that mean that my job is a crime ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2001 02:56 AM
11-27-2001 02:56 AM
Re: Unable to set umask for a user! - HELP!
What is happenning is correct.
As a thumb rule
if you have a umask 644
1. for file permission deduct from 666
i.e in your case 022
-----w--w- (022)
2. for directory permission deduct from 777
i.e; in yourcase 133
d--x-wx-wx (133)
so if you create a directory it will have
d--x-wx-wx (133)
and file will have
-----w--w- (022)
permission
Manoj
As a thumb rule
if you have a umask 644
1. for file permission deduct from 666
i.e in your case 022
-----w--w- (022)
2. for directory permission deduct from 777
i.e; in yourcase 133
d--x-wx-wx (133)
so if you create a directory it will have
d--x-wx-wx (133)
and file will have
-----w--w- (022)
permission
Manoj
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP