2

I have a file uploaded to our website under a /Downloads folder, which I created. The download link, similar to:

A Sample Download Link

had no issues downloading up until a few weeks ago. I am not sure what changed.

I now receive(d) 403 Forbidden nginx as the message. I put past tense, because I saw this SO article. I implemented the solution and the error changed. I now get:

Forbidden

You do not have permission to access this document.

Permissions are file, same as every other file on the web server. Linux is on the back-end and presumably uses Apache.

I talked with the web hosting company and they were not helpful. Making the file name lower case for cosmetic reasons made me hiss and deleting the .exe extension and saying problem solved made me doubly hiss. Neither explains the problem or the solution.

NGINX is obviously part of the picture. That is simply part of the web host package, much like a radio when you lease a car. You get it whether you want it or not, not that NGINX is necessarily the problem.

Permissions on Download and down:

rwx r-x r-x

Someone else added the executable permission, which I want to delete, as the file should be downloadable only, not executable on the server. The web host support technician a few weeks should not have done that. I just left it for now.

Plesk Control Panel

Technician added the following into the Apache and nginx settings area.

Into both Additional Directives for HTTP/HTTPS:

<Location /shared/>
     Options +Indexes
</Location>

I easily found this morning In the Plesk panel, under the Apache & nginx settings for the domain. Checking the box: 'Serve static files directly by nginx' and placed a check in the box, but now I do not see this option there.

Everything else is standard issue (I reserve using the word default, as the index file box has a laundry list and not default checked.).

Thoughts?

Sarah Weinberger
  • 421
  • 2
  • 9
  • 23
  • What are the permissions on /Downloads? Any other files in there that don't have problems? Did you check the Plesk control panel? – Gerard H. Pille Jun 04 '20 at 17:07
  • @GerardH.Pille Permissions are "rwx r-x r-x". I updated the question to reflect your question. – Sarah Weinberger Jun 04 '20 at 17:22
  • "Someone else added the executable permission, which I want to delete" Better school yourself a little, eg. on the meaning of the "executable" permissions of a directory. Do you intend to answer the other questions later? There were three of them. – Gerard H. Pille Jun 04 '20 at 18:02
  • @GerardH.Pille Apologies, I did not see the other 2 questions. All executable files in that folder have the same issue. Downloading anything else, even renaming the executable file, yields a downloadable file. Your Plesk Control Panel question is generic, however I will update the question with the changes that the technician and I made today. – Sarah Weinberger Jun 04 '20 at 19:29
  • Could the problem be on the side of the browser, supposedly running on a windows OS? Because, if the nginx is running on Linux (you mentioned Linux for the backend), then the ".exe" extension has no meaning for nginx. But there could be directives in the nginx configuration forbidding it to server .exe files. But, if nothing chaned on the server side, I'd have a good look at the clients. There may have been an Windows update. – Gerard H. Pille Jun 06 '20 at 17:54
  • @GerardH.Pille Windows 10 on clients, but tried Mac OS too, same deal. Well, technically my manager applied some updates or installed some certificates. I am not sure what he did. He is not technical. I believe that is when things went south, though could have been earlier, as I have not tried downloading an exe in a couple of months. I do not think the hosting company did anything, as we have a DV. – Sarah Weinberger Jun 06 '20 at 23:22
  • I don't know if a Mac would care about an exe file. So, do you find any mention of "exe" in the nginx configuration? When you request such file, is there anything interesting in the response headers apart from the 403? – Gerard H. Pille Jun 07 '20 at 08:51
  • Sic transit gloria mundi. – Gerard H. Pille Jun 17 '20 at 12:28
  • Is this by any chance a site that *also* hosts WordPress? I have a very similar issue for an executable that I FTPed into a folder *outside* the Wordpress folder hierarchy. Enabling "Serve static files directly by nginx" from your SO link was not enough, it turned out that I had to *revert* (it was disabled) 'block access to potentially sensitive files' in the Wordpress Toolkit (https://support.plesk.com/hc/en-us/articles/360022480194-Unable-to-open-PSD-LOG-CMD-EXE-BAT-CSH-or-SH-file-403-Forbidden). The WP Toolkit now gives warning icon for the *still disabled* item, but downloading works... – Jan Doggen Apr 25 '21 at 15:18

0 Answers0