LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 08-13-2007, 09:01 AM   #1
Harlin
Member
 
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?

Thanks,

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

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
umask is not an environment variable. It is a utility. Try this.
Code:
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.
Code:
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.
 
  


Reply

Tags
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 only....how?..plz 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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration