Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-04-2006, 08:01 AM   #1
LQ Newbie
Registered: Sep 2006
Posts: 3

Rep: Reputation: 0
Question please help me on umask concept

please experts help me to under stand the concept of umask . tell me what it is used for.
Old 09-04-2006, 08:55 AM   #2
LQ 5k Club
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Rep: Reputation: Disabled
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
Old 09-04-2006, 09:11 AM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355 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.
Old 09-05-2006, 07:44 AM   #4
LQ 5k Club
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Rep: Reputation: Disabled
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.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the concept behind RAID ? tofee Linux - Newbie 2 05-20-2006 05:44 AM
Do I have this concept down correctly? Creslin Linux - Newbie 7 05-16-2006 03:27 AM
Routing concept ajkannan83 Linux - Networking 1 09-30-2005 05:27 AM
A new concept for install luiwo Linux - Hardware 1 09-05-2004 04:28 AM
LBA-H/w or S/w Concept?? LinuxUser813 Linux - Hardware 0 07-06-2004 02:59 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:29 AM.

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