Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: yoda2021 on April 08, 2021, 10:15:35 AM

Title: PHP files in User Directory not working
Post by: yoda2021 on April 08, 2021, 10:15:35 AM
I have just had CWP Pro installed however when I create any php files in the user directory these are not working, I get the following error in the error log:
[Thu Apr 08 03:03:51.164275 2021] [mime_magic:error] [pid 6924] [client 1.2.3.4.5:55510] AH01512: mod_mime_magic: can't read `/home/xx/public_html/php.php'
[Thu Apr 08 03:03:51.164359 2021] [core:error] [pid 6924] (13)Permission denied: [client 1.2.3.4.5:55510] AH00132: file permissions deny server access: /home/xx/public_html/php.php

The current web server is on Apache only.

When I run the fix file permissions it set's it to 640 and I get the 403 error as above
If I change the permission 644 it just prints out the php code
Title: Re: PHP files in User Directory not working
Post by: Igor S. on April 14, 2021, 01:32:14 PM
First of all the permissions must 644 for files and 755 for folders.
Also, I would recommend to check .htaccess