-   Linux - General (
-   -   please help me on umask concept (

linuxnirmal 09-04-2006 08:01 AM

please help me on umask concept
please experts help me to under stand the concept of umask . tell me what it is used for.

aus9 09-04-2006 08:55 AM

it is used to set the default permissions in your home folder (normally)

each distro may differ.

when you read it in /etc/profile you take the number away from 777 to work out your read write execute permissions for user, group, others

So what you should do is first work out what you want and here is a online calculator for us newbies

eg you want to read and write to a file in your home folder and hide it from everone else

rw becomes 600

now we have (777-600) = 177

so umask 177

bigrigdriver 09-04-2006 09:11 AM is your friend when it comes to finding answers to questions about Linux. Point your browser at that URL, then enter the search phrase "how umask works" (in quotes) to turn up some interesting reading on the subject of umask.

aus9 09-05-2006 07:44 AM

yeah and I forgot to mention that you can not REALLY hide a file from the root user but if you have the root passwd you can do anything in any case.

All times are GMT -5. The time now is 04:41 AM.