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 -
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:
Code:
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 15
Code:
chmod go+w /home/username/public_html/test.png
Function 2 returns this:
Code:
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 51
Code:
chmod g+w public_html/
My Setup
Command Line -
Code:
grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf
Code:
/etc/redhat-release:CentOS release 6.9 (Final)
/usr/local/cpanel/version:11.66.0.23
/var/cpanel/envtype:virtuozzo
CPANEL=release
Command Line -
Code:
php -v
Code:
PHP Version 5.6.31
Command Line -
Code:
mysql -v
Code:
MYSQL Version 5.6.37