July 27, 2011 10:24AM
On 7/27/11 10:12 AM, António P. P. Almeida wrote:
> On 27 Jul 2011 14h50 WEST, nginx-forum@nginx.us wrote:
>
>> Thanks folks. Let me conclude that it is better to keep the owner of
>> my folders to be "root". Then give permission to www-data (nginx
>> user) for every writable folder like upload and images? right?
>
> Yes. Normally a simple 775 is enough with:
>
> chown -R sites-user.www-data /path/to/writabledirs
>
> find /path/to/writabledirs -type d -exec chmod 775 {} \;
>
>> My main question is about the folder ownership; which is better?
>> root or www-data? Because when I normally create folder by SSH or
>> SSH tunnel to server, I am there as root and create folder with root
>> ownership.
>
> Unless you have some sort of esoteric requirements you should,
> *never*, ever, run a web site under the root user.

Don't confuse the guy or make the issue more comlplicated than it is. He
*clearly* stated that he runs nginx under user "www-data" and didn't ask
this question. He wants to know about file write permissions.

....

>
> --- appa
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx


--
Jim Ohlstein

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

write permission for www-data

etrader July 27, 2011 09:27AM

Re: write permission for www-data

douglas July 27, 2011 09:32AM

Re: write permission for www-data

Adam Tucker July 27, 2011 09:32AM

Re: write permission for www-data

Jim Ohlstein July 27, 2011 09:46AM

Re: write permission for www-data

etrader July 27, 2011 09:50AM

Re: write permission for www-data

António P. P. Almeida July 27, 2011 10:16AM

Re: write permission for www-data

Jim Ohlstein July 27, 2011 10:24AM

Re: write permission for www-data

Jim Ohlstein July 27, 2011 10:20AM

Re: write permission for www-data

etrader July 29, 2011 03:29PM

Re: write permission for www-data

António P. P. Almeida July 29, 2011 03:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 178
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready