Data that is written into userspace, including directory creation, requires the ability to write as the user when using PHP. This can be accomplished by installing a module via EasyApache 4. Until a proper module is installed CMS applications like WordPress will be unable to update, install plugins, or use an uploader to write files into the user's webspace.
The default cPanel server has CGI as the PHP handler and the Apache mpm_prefork module. Neither the MPM module or PHP handler will be able to allow data to be written via PHP without an additional module that allows data to be written as the user. A folder can't be created without one of the following options.
There are several options available. The decision is based on the needs of the hosting environment and the server administrators.
The first option is to install the Apache module mod_suexec along with the CGI PHP handler. This module can be installed via EasyApache 4 in WHM or by using yum on a command line. This will install mod_suexec on a cPanel server.
yum install ea-apache24-mod_suexec
The next option is to install the Apache module Ruid2 and also can be installed via EasyApache 4 in WHM or can be installed by using the command:
yum install ea-apache24-mod_ruid2
Do not use Ruid2 with LiteSpeed.
The suPHP module is probably the most recognized from its use on older versions of cPanel, but other options are better due to efficiency and performance. The use of mod_cgi and Ruid2 has a much higher performance increase than suPHP, but if desired, it can be installed using EasyApache 4 in WHM.
The last option here is to use the Apache MPM ITK module mod_mpm_itk. The mod_mpm_itk is currently not the most recommended option as it is best used on a specific configuration of CentOS 7. Please review our documentation at https://docs.cpanel.net/ea4/apache/apache-module-mpm-itk/
Again, this module can also be installed via WHM using EasyApache 4 and also can be installed using the command prompt; however, the current MPM module needs to be removed due to RPM conflicts.
Comments
0 comments
Article is closed for comments.