1834569 Members
3840 Online
110069 Solutions
New Discussion

umask

 
SOLVED
Go to solution
j773303
Super Advisor

umask

I set umask 022, while touch a file, i view a permission is rw_r__r__ , but i'd like to a file permission is rxx_r_xr_x...... how to config it?
Hero
3 REPLIES 3
Jeroen Peereboom
Honored Contributor
Solution

Re: umask

You'll have to set the x-bits yourself, since touch doesn't set it. (If touch sets the x-bits, then umask 027 may overrule this for the world's x-bit.)

So you need a chmod +x ...

JP.
j773303
Super Advisor

Re: umask

Is it means hpux can't create a file which permission is rwxrwxrwx ? Thanks.
Hero
Elmar P. Kolkman
Honored Contributor

Re: umask

HPUX can create files with execute mode. Only, touch and a lot of other commands will not do this, because they think (correctly) that they don't generate executable files.

But to experiment, you could create directories and look at the effect of umask settings and you'll see that your umask does have influence on the execute-bits...
umask 022
mkdir tmp2
umask 027
mkdir tmp3
ls -ld tmp?
Every problem has at least one solution. Only some solutions are harder to find.