Missing files OJS 3

Hey guys, how are you?

I updated from OJS 2 to OJS 3 last week, then I realized that my PDF files aren’t accessible any more.
On the Submission section, in Galleys > PDF > Change File I changed the file’s directory and it works!
Is there some automatic way to do this changes?

Thank you!

Hi @guilhermedomingues,

There are many threads on the forum describing common causes and checks for this issue – I’d suggest doing a quick search.

The upgrade process rearranges the contents of your files_dir, so if e.g. file permissions didn’t permit that, you should’ve received warnings during the upgrade. What kinds of filenames do you see in your files_dir?

Regards,
Alec Smecher
Public Knowledge Project Team

Hey, @asmecher

There are all the articles published in the directory files/journals/2/article/.
Is this dir the same files_dir that you mentioned? If no, where can I find it?

I will look those threads!

I appreciate your help.

Hi @guilhermedomingues,

Yes, that’s where OJS stores article files.

Is the files directory web-accessible? If so, that’s a major security risk – make sure your files_dir is outside the web root, or protected by a .htaccess file from direct access. See docs/README for details.

Find any file within that directory and post what the filename looks like. That will help me to determine whether the migration occurred successfully.

Regards,
Alec Smecher
Public Knowledge Project Team

Hey @asmecher

While I’m in test period, i changed the owner of this dir to apache, just for now. I’ll make sure to change it back asap.

I didn’t find any files within that directory. As I said, I moved all article to that folder.

Tks

Hi @guilhermedomingues,

File ownership isn’t really the issue – it’s where the directory is placed on the server. Check the “Recommended Configuration” section of docs/README for details.

Regards,
Alec Smecher
Public Knowledge Project Team

Hey, @asmecher

The old version files are at /var/www/ojsn/journals/2/articles/

And I checked the php log_errors, there are only warnings about time zone.

Tks.

Hi @guilhermedomingues,

When you run an upgrade from OJS 2.x to OJS 3.x, it’ll look for the submission files in files_dir according to its config.inc.php, and then try to rename them to suit what OJS 3.x needs. If it’s not able to rename the files (e.g. due to file permissions), or the files weren’t there in the first place, then you should receive warnings during the upgrade process to let you know. The end result will be something like what you describe – OJS won’t be able to access the submission files. I’d suggest reviewing the upgrade documents in the “Full Package” area of docs/UPGRADE to ensure that everything was prepared properly.

Regards,
Alec Smecher
Public Knowledge Project Team

The file_dir field in config.inc.php is the dir that will be use to get the old files and put in a new dir? I didn’t understand this.

I’ve already done it. It resolved the article’s cover issue, only.

Thanks for the huge help!

Hi @guilhermedomingues,

When you run an upgrade, your config.inc.php should already point to the location in which your OJS 2.x files exist. It’ll take care of renaming them appropriately. (Beware that this can’t be undone, so you should take a backup before doing it.)

Regards,
Alec Smecher
Public Knowledge Project Team