- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Is that possible to set "file creation mode" ?
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
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
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
10-20-2004 02:00 AM
10-20-2004 02:00 AM
Now we are using an application called egate ( Seebeyond product ), it generates the some files with rw-rw---, how can I make it to create files with rw-rw-r-- ( read only for others ). As i know i can't do nothing with "umask" to change the permission.
Thanks !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2004 02:04 AM
10-20-2004 02:04 AM
Re: Is that possible to set "file creation mode" ?
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2004 02:10 AM
10-20-2004 02:10 AM
SolutionWhen a file is created using the creat() system call or with the open() system call if O_CREAT is asserted, the actual mode of the file is the mode as supplied to the system call with the current umask value "subtracted" from it. It's not really subtraction but the idea is the same. If you have umask set to 000 then whatever mode results when the application creats a file is the mode that the programmer intended.
There is no way to override this behavior nor should there be. If there were, all kinds of security holes would be created.
What you can do, is have a cron process that looks for new regular files on a certain directory tree, owned by a certain user or group and does the chmod after the fact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2004 02:12 AM
10-20-2004 02:12 AM
Re: Is that possible to set "file creation mode" ?
files are per default created with rw-rw-rw- permissions (directories with rwxrwxrwx).
You can only *lower* the permission by using umask.
"umask 002" should result in rw-rw-r-- for files.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2004 02:17 AM
10-20-2004 02:17 AM
Re: Is that possible to set "file creation mode" ?
Execute as,
umask
...
It will give user file-creation mas there.
Try to change that as,
umask 022
touch testfile
ls -l testfile
you can note that permission will be changed to rw-rw-r--
If you want to keep this always from login then, go to your login profile and put umask 002
so that file creation will be changed to your requirement.
HTH.