- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to set umask for rwxrw-r--
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
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
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
тАО03-12-2003 01:29 AM
тАО03-12-2003 01:29 AM
How to set umask for rwxrw-r--
How to set umask for file permission rwxrw-r--
I tried with umask u=rwx g=rw o=r
But I am not getting expected file permission.
I do not know the numeric values setting in umask. Please help on this.
Thanks
R.Ezhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 01:38 AM
тАО03-12-2003 01:38 AM
Re: How to set umask for rwxrw-r--
The numeric value is 764.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 01:45 AM
тАО03-12-2003 01:45 AM
Re: How to set umask for rwxrw-r--
#umask 013
By default for text files it is 666.so with effective umask
it becomes rw-rw-r
For executables and dir it is 777.So with umask it becomes rwxrw-r--
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 01:45 AM
тАО03-12-2003 01:45 AM
Re: How to set umask for rwxrw-r--
umask 764 gives when mkdir:
d-----x-wx
umask 013 gives when mkdir:
drwxrw-r--
Note the x flag is only affected by directories, NOT by files ie.:
umask 764 and touch file:
--------w-
umask 013 and toch file:
-rw-rw-r--
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 01:46 AM
тАО03-12-2003 01:46 AM
Re: How to set umask for rwxrw-r--
use the command umask=021
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 01:53 AM
тАО03-12-2003 01:53 AM
Re: How to set umask for rwxrw-r--
Here are default permissions for files and directories:
rw-rw-rw- for files and
rwxrwxrwx for directories.
It works by subtracting not adding permissions, hence, un-masks.
Best suggestion is to add a chmod line after your file creation line, as umask, as a rule, won't do it.
Examples: umask 022 on files:
default file rw-rw-rw-
umask (----w--w-)
renders rw-r--r--
Examples: umask 022 on dirs:
default file rwxrwxrwx
umask (----w--w-)
renders rwxr-xr-x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 02:03 AM
тАО03-12-2003 02:03 AM
Re: How to set umask for rwxrw-r--
It is not possible with umask.
If umask is set for 022 .
Then the default permissions of a directory created will be ,
777-022=755
(Should subtract umask from 777 )
The default permissions of a file created will be ,
666-022=644
( Should subtract umask from 666)
Therefore there exists no umask value for file permission which would fit in to your requirement.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 02:08 AM
тАО03-12-2003 02:08 AM
Re: How to set umask for rwxrw-r--
You can't achieve rwxrw-r-- with umask as the 'x' permission is omitted when creating files. The nearest is 012 which results in rw-rw-r--.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2003 11:48 AM
тАО03-13-2003 11:48 AM
Re: How to set umask for rwxrw-r--
you should type :
chmod u=rwx,g=rw,o=r
HTH!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2003 12:18 PM
тАО03-13-2003 12:18 PM
Re: How to set umask for rwxrw-r--
As I understand, the files permission when created is determined by default file creation mask which is 666 against your current umask, which means you can NOT create a file with u=rwx what's so ever, you must use chmod to set it.
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2003 12:19 PM
тАО03-13-2003 12:19 PM
Re: How to set umask for rwxrw-r--
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2003 01:42 PM
тАО03-13-2003 01:42 PM
Re: How to set umask for rwxrw-r--
The best you can do is 664 permissions for files (umask 002). This would give directories rwxrwxr-x, and files rw-rw-r--.
Very old unix gave the executable bit, but quite honestly I have not seen this done by the OS since Solaris 1.9(I think).
Regards,
Shannon