• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the current Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Question How to allow the download of files with custom extensions from a Plesk server?

o2k

New Pleskian
Server operating system version
Ubuntu 24.04 LTS (GNU/Linux 6.8.0-36-generic x86_64)
Plesk version and microupdate number
Plesk Obsidian Versión 18.0.62, 28/June/2024 22:53
I have a dedicated Plesk server with several domains. In one of them I want to make available a file called, say, "file.db"
If I try to download that file from a web browser, I get a 403 error page saying:

Forbidden
You do not have permission to access this document.
Web Server at @domain_name@

If I rename the file to a more standard extension, like "mp3" (even though it's not really an mp3 file), then I can download the file from the browser.
So there must be some restriction to let browsers only download files with some extensions.

I tried to edit the files "mime.types" and "mime.types.default" inside /etc/nginx to add a line with "application/octet-stream db;" and then restarting the service/server but that accomplished nothing. I still get the 403 page when trying to download the file.

So how can I make the server allow downloading files with ".db" extension? (renaming the file extension is not an option for me since the file name is hard coded into an app that downloads that file).

Thanks!
 
Is it a Wordpress site? In that case it could be the "Block access to sensitive files" option. Which can enabled and disabled via the Security settings in the WP toolkit.
 
Hello! I'd bet on WP security too but I also would suggest checking /var/www/vhosts/example.com/logs/error_log (in Plesk it's DOmains > example.com > Logs) since ModSecurity can also block specific file extensions (you can add such a rule to ModSec exceptions)
 
Back
Top