I am running a Linux server (a DV server with Media Temple). It's a pretty standard LAMP setup. I'm running PHP 7.4.
I'm using two programs to upload files to the server: Filezilla and a tool called Codeanywhere.
When I upload a PHP file using SFPT with Filezilla the permissions are 664
. When I create a PHP file with Codeanywhere the permissions are 644
. Notice they are slightly different! Both files work when visited in a browser.
I also have a line in my .htaccess that causes .html
files to run as PHP:
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml .html
When I upload an HTML file using SFPT with Filezilla the permissions are still 664
. When I create an HTML file with Codeanywhere the permissions are 644
.
However, the HTML uploaded using Filezilla gets an Internal Server Error
.
Any idea why the HTML file with 644
permissions will run, but the HTML file with 664
permissions won't run. Also, any way to change the default permissions when files are uploaded using Filezilla?
Edit: Additional Information
I've checked the error logs and there are not errors logged related to this issue. The error the browser receives it this:
GET https://sample_domain.com/test.html 500 (Internal Server Error)
If I switch the permissions to '644' on the HTML file, then it works fine.