- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- umask setting
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
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
12-11-2001 08:51 AM
12-11-2001 08:51 AM
Hi,
What value do I set the umask for a user so that any file which gets copied or created gets default permisions of rwx-rx-x.
The max I could get the umask was rw-rw-rw.
Please advice
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 08:53 AM
12-11-2001 08:53 AM
Re: umask setting
To achieve the result you want, use 'umask 046' in the .profile file of the relevant user (try it on the command line first)
'man umask' for more info.
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 08:56 AM
12-11-2001 08:56 AM
SolutionGood luck
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 08:57 AM
12-11-2001 08:57 AM
Re: umask setting
022 is the answer.
Regards,
Justo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 08:58 AM
12-11-2001 08:58 AM
Re: umask setting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:02 AM
12-11-2001 09:02 AM
Re: umask setting
to get rw-rw-rw- , you need a umask 111
...BPK...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:05 AM
12-11-2001 09:05 AM
Re: umask setting
rwxr-x--x will probably not allow others (non User and non Group members) to run the file, as they cannot read it.
Just in case it was not a mis-type.
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:06 AM
12-11-2001 09:06 AM
Re: umask setting
So If I do a chmod each time the delay between file copy and excuting the command on changed file is high.
Any remedy for this, doesn't seem to be the case on Solaris.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:14 AM
12-11-2001 09:14 AM
Re: umask setting
A possible get around (which is probably slower than a chmod) is to 'cp' a dummy file with the right permissions, then copy across the actual file. This should keep the right permissions after copying.
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:16 AM
12-11-2001 09:16 AM
Re: umask setting
Yes, the max you can get for a file is rw permissions for everybody. That''s the way umask works. The exec bit is set for directories and not for files.
A sample test:
#umask
077
#touch test1
#ll test1
-rw------- 1 tester unix 0 Dec 11 12:11 test1
#umask 022
#touch test2
#ll test2
-rw-r--r-- 1 tester unix 0 Dec 11 12:11 test2
#umask 000
#touch test3
#ll test3
-rw-rw-rw- 1 tester unix 0 Dec 11 12:12 test3
#umask 011
#touch test4
#ll test4
-rw-rw-rw- 1 tester unix 0 Dec 11 12:12 test4
#umask 022
#mkdir dirtest
#ll -d dirtest
drwxr-xr-x 2 tester unix 96 Dec 11 12:12 dirtest
**
As you can see even umask of 000 will not do it.
I think there is a logic to this, because execute permission to a new file is not valid in most cases, unless it is an "'executable"' and that would happen only after you edit it (or compile it). Whereas directories would need execute permissions to allow access into their contents (i.e files).
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:36 AM
12-11-2001 09:36 AM
Re: umask setting
I have checked out all options given in your prompt answers the best I could get was rw-rw-rw.
I assumed a file would take the directory's permissions. So doing a chmod 755 is the only way out it seems. Unless someone hits on a bright idea.
AJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:38 AM
12-11-2001 09:38 AM
Re: umask setting
html files do not need to be executable, only readable as the shell will not interpret this code. Any files that are 666 or 777 should automatically be suspect as a security violation since they can be trashed by anyone.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 09:48 AM
12-11-2001 09:48 AM
Re: umask setting
Gif, Jpe or Html files do not need execute permissions to be accessed!! Read permission is sufficent to view it on the browser and write permissions for the owners of the file to manipulate it. The question of execute permission does not arise at all!
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 10:27 AM
12-11-2001 10:27 AM
Re: umask setting
I don't know your environment but I'd create the files somewhere other than the production directory, chmod them, then copy them into production. You could use cpio, tar, cp, rcp, or whatever just so long as you preserve permissions (and ownership).
Darrell