Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-08-2011, 07:27 AM   #1
LQ Newbie
Registered: Jan 2011
Posts: 12

Rep: Reputation: 0
Umask Permission Question

I am doing an experiment with umask. I have set umask 000 in .bash_profile but when I create a new file using a login shell the permissions are rw-rw-rw-

Can anyone explain why this happened?
How could I make the default permissions of new files rwxrwxrwx?

Thanks for any help.
Old 02-08-2011, 08:12 AM   #2
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 84

Rep: Reputation: 21

Try to add umask to .bashrc file.
Old 02-08-2011, 08:18 AM   #3
LQ Newbie
Registered: Feb 2011
Location: Waterloo, Ontario, Canada
Distribution: Ubuntu 10.10, Arch
Posts: 11

Rep: Reputation: 0
I believe the default permission for any file created is 666
so umask 000 would give u 666, which is rw_rw_rw
Old 02-08-2011, 09:52 AM   #4
Mr. Alex
Senior Member
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
umask is better in /etc/profile and rwxrwxrwx will be only for directories. rw-rw-rw- for files.


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
Permission and Umask questions Chaosbreaker Linux - Security 5 12-09-2010 05:13 AM
why newly created file permission always 644...umask issue eboy98 Linux - Security 16 03-13-2010 06:23 AM
permission settings umask / samba create mask eRJe Linux - Server 2 02-22-2010 07:08 AM
umask and default file permission cool9292 Linux - Newbie 2 03-10-2006 08:03 PM
vsftp umask and permission problem dagalicous Linux - Software 2 10-22-2003 09:55 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration