LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Umask (https://www.linuxquestions.org/questions/linux-software-2/umask-386581/)

metallica1973 11-25-2005 10:07 PM

Umask
 
666 Default Permission for a text file
-022 Minus the umask value
--------------------------------------
644 Allowed Permissions

this is my understanding of umask. Read the above example.

MY question is: why would you have a command like UMASK 022

why wouldnt linux just use standard permission rules and just use UMASK 666. I think that would be more logical!

acid_kewpie 11-26-2005 02:04 AM

why? because you don't want other people reading your files... you'd never wawnt to let world readership of priviate data would you??!

metallica1973 11-27-2005 10:02 AM

I meant

UMASK 644, instead of using UMASK 022. To me that just makes sense. What is the point of

standard file permission 666 Standard Directory permission 777
-022 -022
------- -------

644 default file permission 755 default

Why not just umask 644 and umask 755?

Brian1 11-27-2005 11:18 AM

You might be a bit confused about what you are seeing. There are two things umask which is used in your fstab file and chmod which is a command. In umask 0 is read/write/execute and in chmod 0 is no permissions. Where as in umask 7 is no permissions and chmod 7 is read/write/execute. Number scheme is backwards between the two. This link should help you with the two. http://library.n0i.net/linux-unix/ad...17.htm#E69E126

Hope this helps.
Brian

metallica1973 11-27-2005 01:21 PM

thanks for all you help.


All times are GMT -5. The time now is 05:42 AM.