0

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.

Adam
  • 3
  • 1
  • 3
  • 1
    What I recommend is accessing the Apache log to see what triggered the "Internal Server Error" error, along with the code. These errors log are usually located in `/var/log/apache2/error.log` – Tom May 03 '22 at 18:23
  • I did check the error log. Nothing helpful in the log. Seems like the error does not register. – Adam May 03 '22 at 18:30
  • What is it in the log? Are you sure it's the correct log file? – vidarlo May 03 '22 at 18:59

0 Answers0