Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Aug 02, 2010 11:05 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
Hi Everyone,
I have a question about permissions :)

Is it possible to somehow setup a directory so that anything put in it will have the same permissions? Sometimes I put stuff in my public_html directory and the permissions are weird. I would like to make them consistent, if possible, without having to chmod every time I upload files.

Thanks in advance for your help,


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2010 5:54 am 
Offline
Senior Member

Joined: Tue Feb 19, 2008 10:55 am
Posts: 164
what you can do is use the setgid bit. man chmod.

just as an example:

find ./public_html -type d -exec chgrp www-data {} \;
find ./public_html -type d -exec chmod g+ws {} \;

I'm not sure what group you want to set.


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2010 11:25 pm 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
Instead of cp, you could scp them to localhost:/targetdir as the target user eliminating the step to change their ownership.

I'm not sure if that's what you're asking for.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group