LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-13-2006, 05:23 PM   #1
DrRobin22
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.

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

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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, 05:46 PM   #3
fudam
Member
 
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, 05:46 PM   #4
DrRobin22
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Original Poster
Rep: Reputation: 0
umask

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


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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:43 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration