View and download PDF's

Hi there, here we have the OJS system installed on our local server, but a few days ago some files aren’t showed in the PDF article section on our OJS website. I’ve checked all permissions and the path file on config.inc.php ( files_dir = files ). I just cannot understand how some kind of artciles are show and others isn’t. They all have the same path (public_html/files/journals/[$id]/articles/[$id]/public/[$PDFfile]). I’ve also checked the “readable php” and run it on some files, and all are “readable”. I also tried open this files direct from the path in url and they all are fine…

Hi @EnzoGehlen,

Have you protected your files directory from direct access via the web server? If not, your system could be unsafe. Check docs/README under “Recommended Configuration”.

Regards,
Alec Smecher
Public Knowledge Project Team

But how it can help me about the pdf?

Yes, they all protected. But my problem continues happening

Hi @EnzoGehlen,

I’d suggest adding some error_log statements to FileManager.inc.php (specifically downloadFile) to capture exactly what path/filename OJS is trying to read the file from, and whether or not it’s able.

Just to be sure, it shouldn’t be possible to access your files_dir contents through the web browser at all. If you haven’t added a .htaccess to prevent that, please do so ASAP. (Or better yet, move it outside the web root.)

Regards,
Alec Smecher
Public Knowledge Project Team