Umask Calculator
RegisterLogin
Umask Calculator
Post Description: i need to calculate a umask value for my default linux permissions on my server. i dont want to have to be changing the permissions on each file everytime i create one
Tags: umask, calculator
This Post Was Posted On Apr 28, 2010 By Less #3430
Post Description: i need to calculate a umask value for my default linux permissions on my server. i dont want to have to be changing the permissions on each file everytime i create one
Tags: umask, calculator
This Post Was Posted On Apr 28, 2010 By Less #3430
Umask Calculator by Less
this is what i have learned so far
Umask Created Files Created Directories
Umask Created Files Created Directories ------------------------------------------------------------- 000 666 (rw-rw-rw-) 777 (rwxrwxrwx) 002 664 (rw-rw-r--) 775 (rwxrwxr-x) 022 644 (rw-r--r--) 755 (rwxr-xr-x) 027 640 (rw-r-----) 750 (rwxr-x---) 077 600 (rw-------) 700 (rwx------) 277 400 (r--------) 500 (r-x------)
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
odity
#3994 1
the way i do it is like this:
for files: 664 you can find out the umask like this
666
-664
-------
002
for files: 664 you can find out the umask like this
666
-664
-------
002
May 23, 2010 Reply Report abuse
David
#9869
WRONG! the permissions resulting from a umask is calculated by performing a binary AND on 666 for files and 777 for directories. IE:
DEFAULT: 666 = 110|110|110
UMASK : 023 = 111|101|100 (umask = 023 = 000|010|011)
============ : 644 = 110|100|100
As you can see the results are similar to subtracting but not the same.
DEFAULT: 666 = 110|110|110
UMASK : 023 = 111|101|100 (umask = 023 = 000|010|011)
============ : 644 = 110|100|100
As you can see the results are similar to subtracting but not the same.
Jul 25, 2012 Report abuse
umask3.0
#3925 2
i have created a umask calculator script using javascript which you can run on your browser, if anyone is interested let me know. the file is only 30k long. so it very easy to upload. thanks you
May 04, 2010 Reply Report abuse
©2012 Webune Forums - Wed Jul 25, 2012 11:46 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3