On Tue, Feb 20, 2001 at 10:28:21PM -0800, Mike Egglestone wrote:
> Hi all...
> I've been working all day on this one and can't figure it out....
> maybe you can help...
> 
> say I have a folder like so......
> /var/www/
> 
> I want to set the permissions so that the "owner" and "group" have 
> read, write, execute rights to /var/www  (all the time)
> I want "other" to just have read and excute.....
> I'm not sure how to set this so that when either the "owner" OR a "group"
> member writes a file... or edits a file in /var/www/ ........the
> permission stay
> as 775.......
> Am I making any sense?
> Currently,  when the "owner" goes in there... they create a file...
> and the permissions are set to this.....
> -rw-r--r--

umask 002

> but... I want it to more like this....
> -rwxrwxr-x

you don't want execute permission on everything, you only need execute
permission on directories and executables, web pages are not
executable and therefore do not need nor should have execute
permission.  this is the default so you should not have to worry about
it much.  

> How do I set the /var/www directory (Recursively) so that no matter who
> creates or
> edits a file... will create the file with these permissions...  775

chmod -R ug=rwX,o=rX /var/www

the capitol X causes chmod to only add x permission to directories and
files which already have at least one execute bit set.  

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgp4Ee9mJY6lu.pgp
Description: PGP signature

Reply via email to