Hi @kalel,
That by itself is not enough to consider; see this FAQ entry.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @kalel,
That by itself is not enough to consider; see this FAQ entry.
Regards,
Alec Smecher
Public Knowledge Project Team
I have solved the problem. In files_dir path, I have use backward slash instead of forward slash. When I change the slash, my problem is solved.
Thanks to all who helped me to solve this problem.
Sorry if I sound like a newbie, but where can I access this code?
Hi @caiomelow,
If you’re wondering where to change the files_dir
setting, it’s in your OJS configuration file – config.inc.php
– in the directory on your web server where OJS was installed.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi
I am facing a similar problem, but I know what is wrong, but don’t how to fix.
Till last thursday (15), all submission files on my journal was stored on:
/var/www/ojs/files/uergs/
But now it is stored on
/var/www/ojs/files/journals/
On my config.inc.php:
files_dir = /var/www/ojs/files
As result all files older then september are on uergs folder, how can I unify it again?
And old issues are showing PDF links, but when I click it, no file is loaded on pdf viewer.
Any hint?
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
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
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
@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