PDF and HTML files not charging

Hi. I don’t know what happened, but PDF and HTML files aren´t loading right now. I know the files are in the files_dir path, but I can’t see them in any browser, just an empty screen with (An error occurred while loading the PDF). Same in HTML files.

screenshot

When I try to upload a new file from dashboad, I get (HTTP Error) and in the Cpanel error log this:

Latest web server error log messages:

2020-04-16 15:11:52.862642 [INFO] [1202452] [191.88.175.254:65118:HTTP2-23#APVH_XXXXXX.revistaXXX.net:443] File not found [/home4/revistaX/public_html/XXXXXX.net/404.shtml]

In fact, the page has not been modified in months. I don’t understand why would change the route, if that happened.

Hi @nanaluna,

Either the files_dir in config.inc.php changed, or something changed in your server configuration to prevent OJS from accessing the files there. What do you see inside the directory indicated by the files_dir setting?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher thanks for answer. These are the indications of the file config.inc.php

; Complete path to directory to store uploaded files
; (This directory should not be directly web-accessible)
; Windows users should use forward slashes
files_dir = /home3/revistaX/public_html/ojsXXX/filesEXEC

; Path to the directory to store public uploaded files
; (This directory should be web-accessible and the specified path
; should be relative to the base OJS directory)
; Windows users should use forward slashes
public_files_dir = public

; Permissions mask for created files and directories
umask = 0022

So, Inside filesEXEC directory I can see Journals Folder and inside it (articles and issues). In articles (submissions) and inside (Proof) and there the PDF, HTML and .jpg images, so everything is there but it is not showing in browsers.

Hi @nanaluna,

Have you protected the contents of your files directory from direct access, e.g. using an .htaccess file? I see that you’ve placed it inside public_html, which is dangerous unless you’ve protected them somehow.

Regards,
Alec Smecher
Public Knowledge Project Team

Actually, I didn´t the instalation and I can see a .htaccess file inside public_html with a mod_rewrite to redirect URL´s, and this.
<Files 403.shtml>
order allow,deny
allow from all

but there is not .htaccess file in OJS directory. Is there a problem with that? I´m in charge to upload the material, but I really don´t know how the instalation was made.

Hi @nanaluna,

If suggest trying to download something from inside the files directory directly by typing a URL into it. If you can access/download a file there directly, it’s not safe.

Regards,
Alec Smecher
Public Knowledge Project Team