LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-05-2006, 03:41 PM   #1
Rotwang
Member
 
Registered: Jan 2004
Distribution: CentOS
Posts: 281

Rep: Reputation: 30
Umask on a directory?


I have a directory. Everytime I create a file in that directory, or any subdirectory, I want the permissions of the file I create to be 664 without having to chmod it.

But I only want this to happen in that directory and it's subdirectorys- not *every* file I ever create *anywhere*.

Can I do that?
 
Old 07-05-2006, 05:02 PM   #2
peter72
Member
 
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Blog Entries: 1

Rep: Reputation: 30
You can set it so they all have the same group. Set the gid sticky bit. You can manage it a little bit with groups.
Code:
user@comp>$ chmod g+sw directory 
or 
user@comp>$ chmod 2775 directory
Any files/directories created within that directory will have the same shared group. As far as a directory umask setting, there isn't one I know of. You may also be able to do it with ACL's, but my knowledge of ACL's is limited to that other OS.

Cheers,
Pete
 
  


Reply



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 metallica1973 Linux - Software 4 11-27-2005 01:21 PM
umask help glabiche Linux - Security 1 06-07-2005 08:20 AM
directory umask permissons Thetargos Linux - General 0 05-23-2004 06:24 PM
umask trophy Linux - General 1 04-03-2004 01:17 AM
umask=0,0,0 demmylls Linux - General 2 09-15-2003 12:13 PM

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

All times are GMT -5. The time now is 01:17 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
Open Source Consulting | Domain Registration