- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: I need a umask that will give me perms -r-xr-x...
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
11-10-2004 02:37 AM
11-10-2004 02:37 AM
I need a umask that will give me perms -r-xr-xr-x (For files)
-r-xr-xr-x
What umask setting will give me this??
I tried /usr/bin/umask "a=rx"
/usr/bin/umask "u=rx,g=rx,o=rx"
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 02:42 AM
11-10-2004 02:42 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
You can change the bits that are there but not add executable.
See
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=594537
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 02:48 AM
11-10-2004 02:48 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
umask 222 will do this...
but to see it you would need a file with 777 perms that you copy, as cheryl said umask will not add permissions but restrict...
So no hope to create a file natively with 555 perms...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 02:52 AM
11-10-2004 02:52 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
I am afraid that it is not possible with umask. My understanding of that is that it can only take something away, not add.
If you set the umask to remove nothing, e.g.:
# umask 000
and try to create a plain file, you will see that it gets the perissions rw-rw-rw-, which is the default maxmimu, so to say. By setting umask to something else than 000 can only take away permissions.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 02:54 AM
11-10-2004 02:54 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
Man 2 creat for the details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 02:59 AM
11-10-2004 02:59 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
It's the second message I see from you saying it is not really "substract". Why are you saying that ? What is the difference ?
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 03:02 AM
11-10-2004 03:02 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
Apart from that you don't have to confine yourself to C for that feature.
Any decent (system) programming language should give you this freedom.
E.g. if you have Perl installed consult
perldoc -f open
perldoc -f sysopen
perldoc perlopentut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 03:04 AM
11-10-2004 03:04 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
so no real mathematical arithmetics I suppose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 03:08 AM
11-10-2004 03:08 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
but want the higher level comfort of Perl
see also
perldoc POSIX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 03:15 AM
11-10-2004 03:15 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
---------------------------------------
#include
int main()
{
int Mode = 0777,Umask = 0111,Result_Mode = 0;
(void) printf(\n"Mode = %o Umask = %o ",
Mode,Umask);
Result_Mode = Mode & ~(Umask);
(void) printf("Resulting Mode = %o\n",Result_Mode);
return(0);
} /* main */
----------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2004 03:46 AM
11-10-2004 03:46 AM
Re: I need a umask that will give me perms -r-xr-xr-x (For files)
$ perl -e 'printf"%o\n",0777&~0111'
666