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

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



On Thu, Oct 30, 2008 at 7:04 PM, Clifford W. Hansen
<clifford@nighthawk.co.za> wrote:
> 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 {} \;
thank you, it's helpful when I want to set uniform permissions.


> 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
>



-- 
I'm a debian user and a web developer, using
XML+XSLT+AJAX+XHTML+CSS+PostgreSQL+MONO C#.
I'm in City of Shanghai, China. Welcome to add my IMs!
(msn) starliu@live.com (xmpp)   minxinjianxin@gmail.com
HomePage http://starliu dot 9966 dot com [It's only available when my
personal machine is running, on which it's hosted.]

Reply to: