LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-25-2005, 10:07 PM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,113

Rep: Reputation: 57
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!

Last edited by metallica1973; 11-25-2005 at 10:10 PM.
 
Old 11-26-2005, 02:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
why? because you don't want other people reading your files... you'd never wawnt to let world readership of priviate data would you??!
 
Old 11-27-2005, 10:02 AM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,113

Original Poster
Rep: Reputation: 57
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?

Last edited by metallica1973; 11-27-2005 at 10:04 AM.
 
Old 11-27-2005, 11:18 AM   #4
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
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
 
Old 11-27-2005, 01:21 PM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,113

Original Poster
Rep: Reputation: 57
thanks for all you help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
umask trophy Linux - General 1 04-03-2004 01:17 AM
umask=0,0,0 demmylls Linux - General 2 09-15-2003 12:13 PM
Umask robyso Linux - Security 1 07-14-2003 02:33 PM
umask Spaz17 Linux - Newbie 1 07-04-2003 10:12 AM
umask knueven7 Linux - Newbie 8 04-18-2003 07:30 AM


All times are GMT -5. The time now is 07:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration