New Server - Permission Issues and Missing error_log
New Server - Permission Issues and Missing error_log
I switched to a new larger server and now am getting permission issues and no error_log being outputted.
Tested 2 simple php functions that worked with no issues in the last server.
I show below what was done to "fix" the issues, however, it is not a global fix. I will have to do this for every domain on the server.
Are there settings I need to change that I am missing that would make the permissions issues go away globally?
What do I need to do to produce the error_log?
Function 1 returns this:
Fix the issues with this command line:
Function 2 returns this:
Fixed the issue with this command line:
My Setup Command Line -
Returns -
Command Line -
Returns -
Command Line -
Returns -
Warning: fopen(/home/username/public_html/test.png): failed to open stream: Permission denied in /home/username/public_html/test.php on line 13
Warning: fputs() expects parameter 1 to be resource, boolean given in /home/username/public_html/test.php on line 14
Warning: fclose() expects parameter 1 to be resource, boolean given in /home/username/public_html/test.php on line 15Fix the issues with this command line:
chmod go+w /home/username/public_html/test.pngFunction 2 returns this:
Warning: mkdir(): Permission denied in /home/username/public_html/test.php on line 25
Warning: file_put_contents(test.txt): failed to open stream: Permission denied in /home/username/public_html/test.php on line 48
Warning: file_put_contents(test.txt): failed to open stream: Permission denied in /home/username/public_html/test.php on line 51Fixed the issue with this command line:
chmod g+w public_html/My Setup Command Line -
grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.confReturns -
/etc/redhat-release:CentOS release 6.9 (Final)
/usr/local/cpanel/version:11.66.0.23
/var/cpanel/envtype:virtuozzo
CPANEL=releaseCommand Line -
php -vReturns -
PHP Version 5.6.31Command Line -
mysql -vReturns -
MYSQL Version 5.6.37-
Hello, Do you know if a different PHP handler was enabled on the previous server? You can configure the default PHP handler for each version of PHP using the "PHP Handlers" tab in "WHM >> MultiPHP Manager". We document the permission and ownership requirements for each PHP handler at: PHP Handlers - EasyApache 4 - cPanel Documentation Thank you. 0 -
Where would I go in the old server Apache 3 to see what PHP handlers were enabled? Thanks 0 -
Where would I go in the old server Apache 3 to see what PHP handlers were enabled?
This is found in "WHM >> Configure PHP and suEXEC" on systems using EasyApache 3: Configure PHP and suEXEC - Version 66 Documentation - cPanel Documentation Thank you.0 -
Michael - I appreciate the response back. That information was not on the server after I upgraded it to 4. Currently needed to give permissions at public_html level for every domain by command line. Thanks, stapuff 0 -
Hello, It's possible this relates to the "Enable File Protect" option under the "Security" tab in "WHM >> Tweak Settings". You can disable this option if you prefer, however we suggest leaving it enabled for the added security. Thank you. 0 -
I appreciate the pointer... will take a look at that setting. stapuff 0
Please sign in to leave a comment.
Comments
6 comments