RSS Forums RSS
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 2235 | Replies: 1
Reply
Join Date: Oct 2004
Location: San Francisco, CA
Posts: 338
Reputation: paradox814 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

default all file perm to 660

  #1  
Dec 16th, 2005
What I want to know is there a way that everyime a new folder or file is created it has an automatic permission settings of my choosings? I could have sworn there was a command I could add to the .cshrc file to do this for me. But if I add it there will it work on ftp or just ssh?

whenever a file is created I want it to have 660 permissions
whenever a directory is created I want it to have 771 permissions

currently after I add files/dir I run the following command
find . -type d -user myusername -exec chmod 771 {} \;
find . -type f -user myusername -name '*.php' -exec chmod 660 {} \;
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2004
Location: VA, USA
Posts: 459
Reputation: TKS will become famous soon enough TKS will become famous soon enough 
Rep Power: 6
Solved Threads: 17
TKS's Avatar
TKS TKS is offline Offline
Posting Pro in Training

Re: default all file perm to 660

  #2  
Apr 19th, 2006
Look into the umask settings...

Do the command:
man umask

See Also: http://linuxzoo.net/page/sec_umask.html
My Home Away from Home: Yet Another Linux Blog
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:12 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC