[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what's the group and username of apache2 web server?



On Thursday 30 October 2008 12:55:47 Star Liu wrote:
> I use mono asp.net(a module of apache2) as the backend of my website,
> when I want to modify a file of the website, it says "permission
> denied", so i give write permission to "others" so that asp.net
> program get tha permission to write into this file. I think it's not a
> good solution, I should find out the exact user or group of
> apache(should be the same of asp.net?), then give write permission to
> only this group and user. How to get the group and username of apache?
> thanks

The user and group are www-data, and iirc the default permissions on /var/www 
do not reflect this, but it is safe to change them.

For example I do the following:
chown -R www-data:www-data /var/www
chmod -R 660 /var/www
find /var/www -type d -exec chmod 2770 {} \;

Hope this helps...
-- 
Thank you,

Clifford W. Hansen
PHP Developer / Linux Administrator

(Mobile/SMS)          +27 82 883 8677
(Fax)                 +27 86 503 0634
(E-Mail/Jabber/GMail) clifford@nighthawk.co.za
(GPG)                 0x936D6C19
(Web)                 http://nighthawk.co.za/

"We have seen strange things today!"

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: