LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2003, 01:29 AM   #1
wbdune
LQ Newbie
 
Registered: Oct 2003
Location: Indy
Posts: 14

Rep: Reputation: 0
umask


Is there a way to perminatly change the default umask settings?
I would like to go from 0022 to 0750.

Thanks,

Wade
 
Old 10-14-2003, 01:32 AM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
doesn't setting the umask of 7 on the file owner part make the file owner have no permissions on anything and are you sure you want to make file owner have no permission whatsoever?

edit: clarification

Last edited by megaspaz; 10-14-2003 at 01:46 AM.
 
Old 10-14-2003, 01:36 AM   #3
wbdune
LQ Newbie
 
Registered: Oct 2003
Location: Indy
Posts: 14

Original Poster
Rep: Reputation: 0
I would like for any new file or directory that I make have a default setting of 0750.
Would that not equal "-rw-r-x---".
 
Old 10-14-2003, 01:44 AM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
no. umask is different than chmod. umask is used in some kind of logical operation with your default permissions when a file is created to get the final file's permissions you see if you do an "ls -al".

i myself am not sure as the only thing i know about umask is how it sets up the permissions for my windows partitions in fstab.

on my windows partitions, setting umask = 0002 yeilds a final file/directory permission
of:

rwx - rwx - r-x

umask = 00722 yeilds a file/directory permissions of:

--- - r-x - r-x

edit:
what am i saying. try this for the umask value for a final permissions of 750:

umask=0027

incase you want to read up on umask:

http://www.oreilly.de/catalog/unixcd...er/c02_224.htm

what i don't know is where you can specify setting the umask whether it's a system file or if you can set the umask when mounting your hard drive on boot up.

Last edited by megaspaz; 10-14-2003 at 02:07 AM.
 
Old 10-14-2003, 02:15 AM   #5
podollb
Member
 
Registered: Oct 2003
Location: Grand Forks, ND
Distribution: Suse/Slackware/RH
Posts: 161

Rep: Reputation: 30
umask sets the umask to mask & 0777 (by the way the & is the AND operator and "mask" refers to the mask you give umask as a param)
 
Old 10-14-2003, 02:53 AM   #6
sashhoney
Member
 
Registered: Jul 2003
Distribution: Red Hat, Fedora, Debian
Posts: 85

Rep: Reputation: 15
which shell u r using
in case of bash, u should change the setting in /etc/bashrc
(i assume u r using RH distribution, i dont know about others, but there would be some bashrc file in /etc somewhere in other dist also)
in case of csh u should change the setting in /etc/csh.cshrc
 
  


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 02:17 AM
umask=0,0,0 demmylls Linux - General 2 09-15-2003 01:13 PM
Umask robyso Linux - Security 1 07-14-2003 03:33 PM
umask Spaz17 Linux - Newbie 1 07-04-2003 11:12 AM
umask knueven7 Linux - Newbie 8 04-18-2003 08:30 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration