1834339 Members
2211 Online
110066 Solutions
New Discussion

umask

 
SOLVED
Go to solution
Manuales
Super Advisor

umask

sorry ..

how is configured umask to obtained
-rw-r-----
is umask 022?

Thanks, Manuales.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: umask

Hi Manuales:

Assuming a file, a umask=027 would produce the pattern you describe.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: umask

You must remember that the default permissions are:

Files -- -rw-rw-rw- (or 666)
Directories -- drwxrwxrwx (or 777)

The umask is then "subtracted" from the default permissions.

666 - what umask??? = 640
The answer for files technically would be 026. If you want to make sure directories also get created with no permissions for world/other, then make the umask 027.

Creating file -- 666 - 027 = 640
Creating directory -- 777 - 027 = 750
rariasn
Honored Contributor

Re: umask

Hi Manuales,

Permissions
umask (file/directory)
----- -------------------
000 rw-rw-rw-/rwxrwxrwx
002 rw-rw-r--/rwxrwxr-x
022 rw-r--r--/rwxr-xr-x
027 rw-r-----/rwxr-x---
077 rw-r-----/rwx------

Salud,
ran.
Yogeeraj_1
Honored Contributor

Re: umask

hi manuales,

also see man umask for more information.

0400 ( a=rwx,u-r) Read by owner
0200 ( a=rwx,u-w) Write by owner
0100 ( a=rwx,u-x) Execute (search in directory) by owner
0040 ( a=rwx,g-r) Read by group
0020 ( a=rwx,g-w) Write by group
0010 ( a=rwx,g-x) Execute/search by group
0004 ( a=rwx,o-r) Read by others
0002 ( a=rwx,o-w) Write by others
0001 ( a=rwx,o-x) Execute/search by others


hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)