- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Automstic Permissions
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
09-07-2006 05:53 AM
09-07-2006 05:53 AM
Automstic Permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 05:55 AM
09-07-2006 05:55 AM
Re: Automstic Permissions
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 06:04 AM
09-07-2006 06:04 AM
Re: Automstic Permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 06:07 AM
09-07-2006 06:07 AM
Re: Automstic Permissions
Also take a look at this document:
http://docs.hp.com/en/B2355-90164/ch07s08.html
Regards,
Jaime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 06:09 AM
09-07-2006 06:09 AM
Re: Automstic Permissions
The default permissions for a regular file are '666' (rw-rw-rw-) and the umask is "subtracted" from it.
The is no real easy way to make a regular file have the 'x' bit set by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 06:17 AM
09-07-2006 06:17 AM
Re: Automstic Permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 06:19 AM
09-07-2006 06:19 AM
Re: Automstic Permissions
If you are looking to create a file in a shell script with execute permissions for the owner and/or group, you can't.
The shell uses a permissions argument to open() of octal 0666 which is then modified by the 'umask' value as noted.
In a shell program, you cannot specify the mode.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 06:34 AM
09-07-2006 06:34 AM
Re: Automstic Permissions
You can set the "umask" in the .profile of the user or at the Global.
man umask
sp,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2006 07:35 AM
09-07-2006 07:35 AM
Re: Automstic Permissions
> chmod -R 774
There are things very wrong with this command. The first is that chmod -R is one the most dangerous commands in Unix. It is recursive which means it changes directory and every file from the starting point you give it. If you are root and are sitting at the worst possible location (/) then the command above would destroy your system and would require a complete re-install, either with Ignite/UX or with your CD's , DVD's and patches, and applications, etc. Never use -R until you thoroughly understand the meaning.
Second, 774 is a bad setting for ordinary files. I know that some beginner's books and even classes on Unix will say chmod 774 or 777 is recommended but they are flat out wrong. The vast majority of files in Unix are *NOT* executable and should never be made executable. An interesting thread here in the ITRC showed how a data file created an endless loop when the DBA logged in and it impacted every user on the system.
So do not set the execute on any file unless it is a script (shell, Perl, awk, etc). The correct permission for all files is 6 for the owner, 6 or 4 for group and 0 or 4 for the rest of the world. 666 means that the contents of the file will eventually be trashed, either on puepose or by accident. That is the whole point behind permissions.
Bill Hassell, sysadmin