PHP public_html permissons
It seems like PHP does not have write permissions to account public_html directories by default.
I create an account from within WHM, upload an importbuddy.php backup to restore the site on the server. I get:
Error #224834 . This directory, `/home/cmitest/public_html/`, is not write enabled according to the server. Please verify proper write permissions to continue. If this persists, contact your web hosting provider and tell them that is_writable("/home/cmitest/public_html/") returns FALSE in PHP.
I have to manually change the permissions to 755 on public_html for it to work, then change it back again after. This didn't used to be the case, only started happening recently.
Running CENTOS 6.9 virtuozzo, WHM v68.0.9
-
Hello, Check to see if "Enable File Protect" is enabled under the "Security" tab in "WHM >> Tweak Settings". The File Protect functionality will check the permissions and ownership values on each user account's home and public_html directories and each addon domain's DocumentRoot directory and then set the values accordingly. Note that rather than disabling this option, you may want to consider switching to a different PHP handler: PHP Handlers - EasyApache 4 - cPanel Documentation Thank you. 0 -
If you run multiple sites on a server, for security reasons you should ALWAYS use file protect, and public_html itself should be 750. Never should you set public_html itself as 755. Check your php handling, apache MPM, etc as necessary to make it work. 0 -
The only option I have for PHP handler is PHP or none. Default PHP is set to: ea-php56 0 -
System PHP-FPM Status: Off Should I turn this on? 0 -
The only option I have for PHP handler is PHP or none.
Hello, Are you checking from within Web Host Manager? The "PHP Handlers" tab is found within the "WHM >> MultiPHP Manager" option. You can read about each PHP handler at: PHP Handlers - EasyApache 4 - cPanel Documentation Thank you.0 -
Here's a screenshot 0 -
Hello, It looks like it's CGI that's available. You can install additional handlers using "WHM >> Software >> EasyApache 4" if you want to use a different handler. That said, check out the section on CGI for information on how PHP scripts are executed when it's enabled: PHP Handlers - EasyApache 4 - cPanel Documentation Thank you. 0 -
There are some differences between the 2 servers I have, both are with GoDaddy. One is the latest version of cpanel, but hasn't been migrated to EasyApache4, I ran the migration last week but I broke some Wordpress sites so I had to revert back. It has the option for configure php and suexec. The php handler is set to suphp and suexec is set to on. The other server is cpanel version 66.0.29, but has been migrated to EasyApache4, so it has the Multiphp option. The only option I have for php handler there is cgi. 0 -
The other server is cpanel version 66.0.29, but has been migrated to EasyApache4, so it has the Multiphp option. The only option I have for php handler there is cgi.
You can install additional handlers such as suPHP using "WHM >> Software >> EasyApache 4". The "mod_suphp" package is found under the "Apache Modules" section. Thank you.0 -
Ok, that seems to have solved the issue. Thanks! 0
Please sign in to leave a comment.
Comments
10 comments