Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 08-13-2007, 09:01 AM   #1
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 30
User umask

I have a user named msmith. I have this entry in his .bash_profile:

set umask 775

However, when he creates a file, it always creates it as 664 instead of 775 -- not allowing the file to be executable. Is there anyway to fix this so that his file is always fully 775?


Old 08-13-2007, 10:37 AM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
umask is not an environment variable. It is a utility. Try this.
umask 775
However this umask will create a permission string of 002 which I doubt that you want. The mask is the binary opposite, or complement, of the permission string that you want. If you want a permission string of 775 then the umask value is 002.
umask 002
Also the executable bit is never set when a file is created. You always have to set the executable bit manually after the file is created.


file permission, umask

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
When and why to use Umask ? tofee Linux - Newbie 4 11-26-2009 10:21 AM
setting setting umask for apache user help mickyman Linux - General 0 05-08-2006 05:37 AM
Set umask for user in KDE jferrando Linux - Security 2 01-12-2005 11:41 AM
umask for a user super-momo Debian 5 06-27-2004 02:15 PM
different umask for different user macgyver Linux - Security 6 04-17-2002 12:33 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:37 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