- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can i create files with the following permissi...
Operating System - HP-UX
1824976
Members
3875
Online
109678
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
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
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
тАО09-28-2007 01:47 PM
тАО09-28-2007 01:47 PM
when my user is logon into the server and when i create a user it is created with the permissions 666, i need they be created as 775
how can i do that? i know i have to user umask command, how do i have to add it into .cshrc profile? i do not need to use "chmod 775" i need they be created in automatical way as 775.
please let me know, thanks.
how can i do that? i know i have to user umask command, how do i have to add it into .cshrc profile? i do not need to use "chmod 775" i need they be created in automatical way as 775.
please let me know, thanks.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 02:11 PM
тАО09-28-2007 02:11 PM
Solution
You cannot from the shell. When a file is created two things are at play: the mode and umask. Umask cannot put back what was never there. The default mode for a regular file is 666; the default mode of directories is 777. Umask can then only "subtract" from these values so that even with the very insecure umask of 000, a regular file is created at most with mode 666. This is intenetional as there is never a need for a data file to have the execute bit set. If you actually need the execute bit set then an explicit chmod is required.
Now, if you are creating these files with C or Perl, it is possible to set the mode with the execute also set but not from the shell.
Now, if you are creating these files with C or Perl, it is possible to set the mode with the execute also set but not from the shell.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 07:19 PM
тАО09-28-2007 07:19 PM
Re: How can i create files with the following permissions 775
>Clay: If you are creating these files with C or Perl, it is possible to set the mode with the execute also set but not from the shell.
RIght, typically the only files that need the execute bit set are executables & shlibs. And ld(1) will automatically do that.
The only other case is scripts and since you just about have to have a human involved, he can just use "chmod a+x" after creating them.
If you have a script that creates scripts, you as a human, can add that chmod there.
RIght, typically the only files that need the execute bit set are executables & shlibs. And ld(1) will automatically do that.
The only other case is scripts and since you just about have to have a human involved, he can just use "chmod a+x" after creating them.
If you have a script that creates scripts, you as a human, can add that chmod there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2007 07:51 PM
тАО09-29-2007 07:51 PM
Re: How can i create files with the following permissions 775
Hi,
you can use
umask 002
in the .cshrc to archive write permissions for the group. You'll get a mode of 775 for directories as well.
As the others said: UNIX (and for you think about it: you as well) does not support an automatic setting of the execution bit on plain files normally. You could do it via inheritance ACLs an a directory - but that's another story.
mfG Peter
you can use
umask 002
in the .cshrc to archive write permissions for the group. You'll get a mode of 775 for directories as well.
As the others said: UNIX (and for you think about it: you as well) does not support an automatic setting of the execution bit on plain files normally. You could do it via inheritance ACLs an a directory - but that's another story.
mfG Peter
The Universe is a pretty big place,
it's bigger than anything anyone has ever dreamed of before.
So if it's just us, seems like an awful waste of space, right?
Jodie Foster in "Contact"
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP