Help answer threads with 0 replies.
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-13-2006, 04:23 PM   #1
LQ Newbie
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
Question How to set umask

It appears that a umask issued from the command line gets subtracted from some system default. How can I set a fully open umask so that new files have permissions of 777 thereby over-riding the system defaults. Currently in my environment, entering a umask command of: umask 0000 ...thereafter will only create a file with 666 permissions.

Old 09-13-2006, 04:41 PM   #2
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
umask is a "mask". You don't set file permissions directly with it (as you noted). It simply masks the default permissions. System defaults are 777 for directories and 666 for files. A umask of 000 will let the defaults come through fully (777 for directories, 666 for files). A umask of, e.g., 077, will mask the last two octets of the system defaults leaving you with mode 700 for directories and 600 for files.

There is no umask setting that will create mode 777 files for you. Use the chmod command to alter file permissions after initial creation.
Old 09-13-2006, 04:46 PM   #3
Registered: Feb 2006
Distribution: FC
Posts: 86

Rep: Reputation: 15
If you're still interested in the answer (although haertig's caveat is correct), for bash look in /etc/bashrc
Old 09-13-2006, 04:46 PM   #4
LQ Newbie
Registered: Jul 2004
Posts: 2

Original Poster
Rep: Reputation: 0

Thanks Mr. Haertig...I kinda suspected that what you just said was what was going on...


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
Umask is to be set by users or system ? tofee Linux - Newbie 3 03-24-2006 06:43 AM
Set umask for user in KDE jferrando Linux - Security 2 01-12-2005 10:41 AM
How to set umask value to 0007 cbekannan Linux - Security 4 01-11-2005 12:15 AM
How to set defaul UMASK 037 sbrewer Linux - Software 2 09-15-2004 12:26 PM
can you set a default umask for only certain directories? BrianK Linux - General 3 06-14-2004 09:02 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:44 PM.

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