HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- umask command
Operating System - HP-UX
1828481
Members
3069
Online
109978
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
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-21-2001 08:37 AM
11-21-2001 08:37 AM
umask command
Hi all,
Can anyone explain the exact reasons why the following umask setting '002' expectedly applies a directory permission default of its invers (755) bu applies something like a 664 to all its containing files. Is there a specific reason for this? and does anyone know how I am able to force the file permissions to adhere to a 755 permission setting as well?
thanks in advance!
John
Can anyone explain the exact reasons why the following umask setting '002' expectedly applies a directory permission default of its invers (755) bu applies something like a 664 to all its containing files. Is there a specific reason for this? and does anyone know how I am able to force the file permissions to adhere to a 755 permission setting as well?
thanks in advance!
John
chicken or egg first?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 08:46 AM
11-21-2001 08:46 AM
Re: umask command
Hi:
I hope you meant a umask setting of 022 or your examples don't work.
Directories are created with a default mode of 777 and when xor'ed with a umask of 022 give 755 permissions.
Regular files are created with a default mode of 666 and when xor'ed with a umask of 022 five 644 permissions.
In order to create regular files with permissions of 755 you must using a creation mode of 0777 which would xor with 0022 umask to yield 0755. This is easy to do if creating the file in C but in the shell you would need a chmod after the file is created.
Regards, Clay
I hope you meant a umask setting of 022 or your examples don't work.
Directories are created with a default mode of 777 and when xor'ed with a umask of 022 give 755 permissions.
Regular files are created with a default mode of 666 and when xor'ed with a umask of 022 five 644 permissions.
In order to create regular files with permissions of 755 you must using a creation mode of 0777 which would xor with 0022 umask to yield 0755. This is easy to do if creating the file in C but in the shell you would need a chmod after the file is created.
Regards, Clay
If it ain't broke, I can fix that.
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP