You may also want to look into putting a sticky bit on the directory which
would result in any files created to have group ownership of the parent
directory - this allows to have the owner of the files be anyone where the
group owner 'www-data' remaining constant and apache being able to access
them.
In addition to the below syntax you can use `chmod -R a=X-s,gu+rw,o+r
<directory>` - more good info here http://en.wikipedia.org/wiki/Chmod. It
resets the sticky permissions first then makes directories 'r,w,x' for owner
and group and 'r,x' for others, and files get 'r,w' for owner and group and
'r' for others.
Then you can run chmod g+s <root project directory> to activate the sticky
bit.
-----Original Message-----
From: Andreas Schosser
Sent: Wednesday, April 18, 2012 3:30 AM
To: [email protected]
Subject: Re: apache2 privileges
Hi John
My apache2 server on linux is running as www-data. My project is in a
standard user account. apache2 can't access files on the user account
unless I change the user on the user account directory to www-data.
Try this:
# chown -R john:www-data /your/project
# find /your/project -type f -exec chmod 660 {} \;
# find /your/project -type d -exec chmod 770 {} \;
Now apache can read and write the project files while you are still the
owner.
If you want to be a bit more secure try permissions 640/750.
Hope that helps.
Andreas
--
state of mind ()
http://www.state-of-mind.de
Franziskanerstraße 15 Telefon +49 89 3090 4664
81669 München Telefax +49 89 3090 4666
Amtsgericht München Partnerschaftsregister PR 563
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
Daniel Sokolowski
Web Engineer
Danols Web Engineering
http://webdesign.danols.com/
Office: 613-817-6833
Fax: 613-817-4553
Toll Free: 1-855-5DANOLS
Kingston, ON K7L 1H3, Canada
Notice of Confidentiality:
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review re-transmission dissemination or other use of or taking
of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you received this in error
please contact the sender immediately by return electronic transmission and
then immediately delete this transmission including all attachments without
copying distributing or disclosing same.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.