You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Rose, John B" <jb...@utk.edu> on 2015/08/11 17:22:59 UTC

[users@httpd] Apache and Wordpress file permissions options

Any recommendations on the best method to accomplish individual users Wordpress installations maintaining their owner:group instead of changing to the owner:group of the Apache process?

Not a Wordpress multi-user installation. Each user installs their own Wordpress.

Looking at the Wordpress site ...

https://codex.wordpress.org/Changing_File_Permissions

Any pros/cons regarding these Apache modules?


  *   suPHP<http://www.suphp.org/Home.html>, runs through php-cgi, currently unmaintained since 2013.
  *   mod_ruid2<https://github.com/mind04/mod-ruid2>, apache module, simple but effective.
  *   mpm-itk<http://mpm-itk.sesse.net/>, apache module.
  *   PHP-FPM<http://php-fpm.org/>, a FastCGI server with more extensive configuration.

Thanks for your time

Re: [users@httpd] Apache and Wordpress file permissions options

Posted by Rich Bowen <rb...@rcbowen.com>.

On 08/12/2015 01:06 PM, Rose, John B wrote:
> So my question is, while using prefork and php-fpm isn't ideally
> efficient, it isn't a problem if we use prefork and php-fpm. That won't
> break anything?

No, it won't *break* anything. Just that prefork is significantly less 
efficient than the alternatives.

Also, for much of this conversation I believe we were unaware that we're 
dealing with 2.2. mod_proxy_fcgi is a 2.4 module, and you have to go 
third-party in 2.2 for the same functionality. Not that that's a 
blocker, of course, just another step.

</Rich>


-- 
Rich Bowen - rbowen@rcbowen.com - @rbowen
http://apachecon.com/ - @apachecon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and Wordpress file permissions options

Posted by "Rose, John B" <jb...@utk.edu>.
So if we are using 2.2 Apache then we could move to "worker" mpm with
php-fpm.

At the moment we wanted to fix this Wordpress/change owner issue quickly.

To users wanting to use point and click tools to load images, themes and
plugins etc in Wordpress and concerned about file ownership it is a
necessity.

Plus we cannot monitor their quotas.


So my question is, while using prefork and php-fpm isn't ideally
efficient, it isn't a problem if we use prefork and php-fpm. That won't
break anything?


Thanks


On 8/12/15 12:41 PM, "Rich Bowen" <rb...@rcbowen.com> wrote:

>
>
>On 08/11/2015 12:43 PM, Rose, John B wrote:
>> We are using Apache 2.2, so we are using prefork.
>>
>> So no problems using PHp-fpm and prefork on Apache 2.2?
>
>php-fpm is a separate service from apache httpd. Requests are proxied
>from Apache httpd to php-fpm. So while it doesn't matter which MPM
>you're running on the front-end server (or, indeed, if you're running
>Apache httpd at all), we do rather strongly recommend that you 1)
>upgrade to 2.4 if at all possible, and 2) don't use prefork unless
>there's some compelling reason to do so. In the old days, the compelling
>reason to use prefork was that you were using it in conjunction with
>mod_php, which had possible threading problems (to oversimplify). If
>you're using php-fpm instead of using mod_php, then there's really no
>reason any more to use prefork.
>
>
>-- 
>Rich Bowen - rbowen@rcbowen.com - @rbowen
>http://apachecon.com/ - @apachecon
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and Wordpress file permissions options

Posted by Rich Bowen <rb...@rcbowen.com>.

On 08/11/2015 12:43 PM, Rose, John B wrote:
> We are using Apache 2.2, so we are using prefork.
>
> So no problems using PHp-fpm and prefork on Apache 2.2?

php-fpm is a separate service from apache httpd. Requests are proxied 
from Apache httpd to php-fpm. So while it doesn't matter which MPM 
you're running on the front-end server (or, indeed, if you're running 
Apache httpd at all), we do rather strongly recommend that you 1) 
upgrade to 2.4 if at all possible, and 2) don't use prefork unless 
there's some compelling reason to do so. In the old days, the compelling 
reason to use prefork was that you were using it in conjunction with 
mod_php, which had possible threading problems (to oversimplify). If 
you're using php-fpm instead of using mod_php, then there's really no 
reason any more to use prefork.


-- 
Rich Bowen - rbowen@rcbowen.com - @rbowen
http://apachecon.com/ - @apachecon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and Wordpress file permissions options

Posted by Daniel <df...@gmail.com>.
Why would you use prefork if php is processed by something else? Why still
force httpd to use a non-threaded model?

2015-08-11 18:43 GMT+02:00 Rose, John B <jb...@utk.edu>:

> We are using Apache 2.2, so we are using prefork.
>
> So no problems using PHp-fpm and prefork on Apache 2.2?
>
> Sent from my iPad
>
> On Aug 11, 2015, at 11:36 AM, Daniel <df...@gmail.com> wrote:
>
>
>
> 2015-08-11 17:22 GMT+02:00 Rose, John B <jb...@utk.edu>:
>
>> Any recommendations on the best method to accomplish individual users
>> Wordpress installations maintaining their owner:group instead of changing
>> to the owner:group of the Apache process?
>>
>> Not a Wordpress multi-user installation. Each user installs their own
>> Wordpress.
>>
>> Looking at the Wordpress site …
>>
>> https://codex.wordpress.org/Changing_File_Permissions
>>
>> Any pros/cons regarding these Apache modules?
>>
>>
>>    - suPHP <http://www.suphp.org/Home.html>, runs through php-cgi,
>>    currently unmaintained since 2013.
>>    - mod_ruid2 <https://github.com/mind04/mod-ruid2>, apache module,
>>    simple but effective.
>>    - mpm-itk <http://mpm-itk.sesse.net/>, apache module.
>>    - PHP-FPM <http://php-fpm.org/>, a FastCGI server with more extensive
>>    configuration.
>>
>> Thanks for your time
>>
>
> Hello,
>
> You should just use php-fpm, it allows you to define different "pools"
> with their own setup, including user and ip:port/unix socket, and it's the
> way php is supposed to be "processed" nowadays, by its own daemon.
>
> php-fpm is also ideal because it rids the burden of php from apache HTTPD,
> while this one can use the most performant mpm (event) to deal with its own
> work.
>
> To each their own!
>
>
> --
> *Daniel Ferradal*
> IT Specialist
>
> email         dferradal at gmail.com
> linkedin     es.linkedin.com/in/danielferradal
>
>


-- 
*Daniel Ferradal*
IT Specialist

email         dferradal at gmail.com
linkedin     es.linkedin.com/in/danielferradal

Re: [users@httpd] Apache and Wordpress file permissions options

Posted by "Rose, John B" <jb...@utk.edu>.
We are using Apache 2.2, so we are using prefork.

So no problems using PHp-fpm and prefork on Apache 2.2?

Sent from my iPad

On Aug 11, 2015, at 11:36 AM, Daniel <df...@gmail.com>> wrote:



2015-08-11 17:22 GMT+02:00 Rose, John B <jb...@utk.edu>>:
Any recommendations on the best method to accomplish individual users Wordpress installations maintaining their owner:group instead of changing to the owner:group of the Apache process?

Not a Wordpress multi-user installation. Each user installs their own Wordpress.

Looking at the Wordpress site ...

https://codex.wordpress.org/Changing_File_Permissions

Any pros/cons regarding these Apache modules?


  *   suPHP<http://www.suphp.org/Home.html>, runs through php-cgi, currently unmaintained since 2013.
  *   mod_ruid2<https://github.com/mind04/mod-ruid2>, apache module, simple but effective.
  *   mpm-itk<http://mpm-itk.sesse.net/>, apache module.
  *   PHP-FPM<http://php-fpm.org/>, a FastCGI server with more extensive configuration.

Thanks for your time

Hello,

You should just use php-fpm, it allows you to define different "pools" with their own setup, including user and ip:port/unix socket, and it's the way php is supposed to be "processed" nowadays, by its own daemon.

php-fpm is also ideal because it rids the burden of php from apache HTTPD, while this one can use the most performant mpm (event) to deal with its own work.

To each their own!


--
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com<http://gmail.com>
linkedin     es.linkedin.com/in/danielferradal<http://es.linkedin.com/in/danielferradal>

Re: [users@httpd] Apache and Wordpress file permissions options

Posted by Daniel <df...@gmail.com>.
2015-08-11 17:22 GMT+02:00 Rose, John B <jb...@utk.edu>:

> Any recommendations on the best method to accomplish individual users
> Wordpress installations maintaining their owner:group instead of changing
> to the owner:group of the Apache process?
>
> Not a Wordpress multi-user installation. Each user installs their own
> Wordpress.
>
> Looking at the Wordpress site …
>
> https://codex.wordpress.org/Changing_File_Permissions
>
> Any pros/cons regarding these Apache modules?
>
>
>    - suPHP <http://www.suphp.org/Home.html>, runs through php-cgi,
>    currently unmaintained since 2013.
>    - mod_ruid2 <https://github.com/mind04/mod-ruid2>, apache module,
>    simple but effective.
>    - mpm-itk <http://mpm-itk.sesse.net/>, apache module.
>    - PHP-FPM <http://php-fpm.org/>, a FastCGI server with more extensive
>    configuration.
>
> Thanks for your time
>

Hello,

You should just use php-fpm, it allows you to define different "pools" with
their own setup, including user and ip:port/unix socket, and it's the way
php is supposed to be "processed" nowadays, by its own daemon.

php-fpm is also ideal because it rids the burden of php from apache HTTPD,
while this one can use the most performant mpm (event) to deal with its own
work.

To each their own!


-- 
*Daniel Ferradal*
IT Specialist

email         dferradal at gmail.com
linkedin     es.linkedin.com/in/danielferradal

Re: [users@httpd] Apache and Wordpress file permissions options

Posted by "Rose, John B" <jb...@utk.edu>.
So using php-fpm negates any need to use suexec, correct?

Sent from my iPad

> On Aug 11, 2015, at 12:31 PM, Rich Bowen <rb...@rcbowen.com> wrote:
> 
> 
> 
>> On 08/11/2015 11:22 AM, Rose, John B wrote:
>> Any recommendations on the best method to accomplish individual users
>> Wordpress installations maintaining their owner:group instead of
>> changing to the owner:group of the Apache process?
>> 
>> Not a Wordpress multi-user installation. Each user installs their own
>> Wordpress.
>> 
>> Looking at the Wordpress site …
>> 
>> https://codex.wordpress.org/Changing_File_Permissions
>> 
>> Any pros/cons regarding these Apache modules?
>> 
>>  * suPHP <http://www.suphp.org/Home.html>, runs through php-cgi,
>>    currently unmaintained since 2013.
>>  * mod_ruid2 <https://github.com/mind04/mod-ruid2>, apache module,
>>    simple but effective.
>>  * mpm-itk <http://mpm-itk.sesse.net/>, apache module.
> 
> These first three are all essentially unmaintained.
> 
> 
>>  * PHP-FPM <http://php-fpm.org/>, a FastCGI server with more extensive
>>    configuration.
> 
> This is the one.
> 
> I know that the PHP docs don't yet say that this is the preferred way to run PHP on Apache httpd - that has been on my ToDo list for quite a while now - but it *is* the preferred way to run PHP on Apache httpd, for all of the reasons - security, performance, ease of configuration, and so on.
> 
> So, yeah, we need the docs to catch up with reality. I promise, it's on my ToDo list.
> 
> 
> -- 
> Rich Bowen - rbowen@rcbowen.com - @rbowen
> http://apachecon.com/ - @apachecon
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and Wordpress file permissions options

Posted by Rich Bowen <rb...@rcbowen.com>.

On 08/11/2015 11:22 AM, Rose, John B wrote:
> Any recommendations on the best method to accomplish individual users
> Wordpress installations maintaining their owner:group instead of
> changing to the owner:group of the Apache process?
>
> Not a Wordpress multi-user installation. Each user installs their own
> Wordpress.
>
> Looking at the Wordpress site …
>
> https://codex.wordpress.org/Changing_File_Permissions
>
> Any pros/cons regarding these Apache modules?
>
>   * suPHP <http://www.suphp.org/Home.html>, runs through php-cgi,
>     currently unmaintained since 2013.
>   * mod_ruid2 <https://github.com/mind04/mod-ruid2>, apache module,
>     simple but effective.
>   * mpm-itk <http://mpm-itk.sesse.net/>, apache module.

These first three are all essentially unmaintained.


>   * PHP-FPM <http://php-fpm.org/>, a FastCGI server with more extensive
>     configuration.

This is the one.

I know that the PHP docs don't yet say that this is the preferred way to 
run PHP on Apache httpd - that has been on my ToDo list for quite a 
while now - but it *is* the preferred way to run PHP on Apache httpd, 
for all of the reasons - security, performance, ease of configuration, 
and so on.

So, yeah, we need the docs to catch up with reality. I promise, it's on 
my ToDo list.


-- 
Rich Bowen - rbowen@rcbowen.com - @rbowen
http://apachecon.com/ - @apachecon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org