Can't download or view pdf files

I discovered that my problem is related to this thred: Security issue: Hacking via submission in OJS 2.4.8

I did all recommendations, but I didn’t find out how to unify the folders on system, so I decide to run a rsync between these folders. And I keep the journals as the main dir_file.

I moved all files to a ojsdata outsite webroot and now I think it is safe. I am not the one who installed this instance, so I didn’t know that files was under the webroot.

Best

Israel

Hi @israel.cefrin,

That sounds like a reasonable solution – I suppose you could also do a few find -exec commands to merge the two areas together. Glad to hear you’ve gotten it going.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Can you give me a example of find -exec to run?

I just ran rsync -Cravzp between folders (I still have both on my local machine for backup, but online just “journals” exists now.

Best
Israel Cefrin

Hi @israel.cefrin,

Sure – these are off the top of my head, so hopefully no major blunders.

If you have /path/to/old-files and /path/to/new-files:

cd /path/to/old-files
find . -type d -exec mkdir "/path/to/new-files/{}" ";"
find . -type f -exec cp "{}" "/path/to/new-files/{}" ";"

The first find command creates necessary directories (there will probably be duplicates, errors can be ignored). The second copies files into them.

Probably not the most elegant solution, but it’s the one that comes to mind first.

Regards,
Alec Smecher
Public Knowledge Project Team

Tks @asmecher , I´ll give a try on this commands.

Best

Israel

Hi @asmecher

I have also faced the same problem. None of the PDF files in the published issues can be viewed or downloaded.

While reading these treads I found the thread on “Security issue: Hacking via submission in OJS 2.4.8” . Following the article I investigated my own system and found that mine was also hacked by the same way.

As suggested, now I have moved the files_dir in config.inc.php to a folder outside my webroot. Directory browsing was disabled from the beginning from Apache. I believe now, the system is better protected.

But my issue is, still I can not view or download the PDF files. I have tried with a previous backup (both DB and files) which I have taken before the hacker attack. But the result was same. I also restored this backup in another physical server and kept files_dir setting according to my original location (inside webroot) while troubleshooting this PDF issue, but no luck.
Please help.

Hi @desilvarami,

What version of OJS are you using? Have you checked that the files_dir setting in config.inc.php is accurate, and that file permissions permit OJS to interact with files in that directory (and its subdirectories etc)?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Thank you for the directions. The problem was backward slashes instead of forward slashes. When updating the files_dir setting to a outside file location from webroot, I copied the new path from windows explorer and forgot to update the direction of the slashes.
Everything seems to be alright now. Thank you very much.

I cant yet solve problem. Please help me.

“/home2/com/domains/.com/public_html/files”

PDF SIZE IS 0.

It SEEMS, NO FILES IN DIRECTORY

I click in admin system after click see error: 500 Internal Server Error

Hi
Please help me
Thanks

Hi @Adminojs,

Don’t put your files storage area inside your webroot, or you risk being attacked through malicious uploads! See docs/README in the “Recommended Configuration” area.

If you see a 500 error, then more information should appear in your PHP error log.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi
I Upgraded to OJS 3 the lats.
I have also faced the same problem. None of the PDF files in the published issues can be viewed or downloaded.
I checked that the files_dir setting in config.inc.php is accurate, and that file permissions ( 755 ) permit OJS to interact with files in that directory (and its subdirectories etc)

files_dir = /***//public_html//files

but nothing worked

can you help me pleas :cry:

Hi @Bahattab,

I’ve responded to your other post. Please don’t double-post; it clutters the forum.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

@asmecher
I am a new comer of OJS. All the paper (PDF) in my journal can’t be downloaded or even downloaded. This problem were begun after my institution’s web made a migration to the other server. As a new user of OJS I don’t have any idea about how to solve this problem. You can see list of the content at http://journal.ummat.ac.id/index.php/elementary/issue/view/51 and the problem viewed at ANALISIS PENCAPAIAN 8 KOMPONEN STANDAR AKREDITASI SD/MI DI KOTA MATARAM | Haifaturrahmah | Jurnal Elementary : Kajian Teori dan Hasil Penelitian Pendidikan Sekolah Dasar. Thank you very much…

I use OJS 2.4.8.2. version

We are facing problem with url all pdf link are showing blank
https://journals.eduindex.org/index.php/ejbss/issue/view/493

We have multiple journals. Some journals is working fine. But one journal’s pdf are not opening.
https://journals.eduindex.org/index.php/ejbss/issue/view/493

Hi @Pen2Print,

There are already lots of suggestions in this thread. What have you tried, and what was the result?

Regards,
Alec Smecher
Public Knowledge Project Team

Issue resolved after we changed file permission in Journal Articles of that journal in ojsdata.

image

beg to help how to fix errors like this when I download the file can not be opened

https://jurnal.ideaspublishing.co.id/index.php/ideas/article/view/193/107