I can`t migrate OJS from 3.0.2 to 3.1.2

Hi, I’m trying to migrate OJS from version 3.0.2 to 3.1.2.
When I run the “php tools / upgrade.php upgrade” script, it throws this error

[code: Installer Installer :: moveReviewerFiles]

There are no readable files in this directory tree. Are safe mode or open_basedir active?

Stack Trace:

File: /var/www/html/classes/install/Upgrade.inc.php line 1991
Function: FileManager-> mkdirtree ("")

File: /var/www/html/lib/pkp/classes/install/Installer.inc.php line 421
Function: Upgrade-> moveReviewerFiles (Object (Upgrade), Array (1))

File: /var/www/html/lib/pkp/classes/install/Installer.inc.php line 265
Function: Installer-> executeAction (Array (3))

File: /var/www/html/lib/pkp/classes/install/Installer.inc.php line 186
Function: Installer-> executeInstaller ()

File: /var/www/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 88
Function: Installer-> execute ()

File: /var/www/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 64
Function: UpgradeTool-> upgrade ()

File: /var/www/html/tools/upgrade.php line 34
Function: UpgradeTool-> execute ()

ojs2: There are no readable files in this directory tree. Are safe mode or open_basedir active?

I have already reviewed documentation of similar problems but I still have the same problem, so if anyone has had this problem I would appreciate your help.
I remain at your disposal to provide the data you deem necessary.

Hi @mvalente

Are you starting with a fresh OJS 3.1.2 installation? If so, have you updated the files_dir configuration directive to point at your files directory?


Hello, thanks for answering.
My parameter “file_dir” points to / var / www / files, it is the same as the version that is working. If necessary I attach my configuration file

No, please don’t attach your configuration file.

If you’re upgrading from the command line, are you sure that your user account can see/read the files in your files_dir directory? This might just be a permission problem.


I applied chmod -R 777 /var/www/files. It’s thar right ?

No, don’t do that either. That will certainly get you access, but it also gives everyone on the server and potentially anyone in the world (through vulnerabilities in other applications or an OJS misconfiguration) access. My recommendation would be to carefully give yourself access through selective chmod or chown commands, run your upgrade, and then put the permissions back the way they are currently.


Yes, I understand, but for the purpose of doing the migration I set the permissions to rule out that it is an access problem. They are useful for testing, but not for use.

Hi @mvalente,

Also please note that you should not place the files directory inside the web root unless you protect it from direct access. See docs/README.md in the “Recommended Configuration” section.

Alec Smecher
Public Knowledge Project Team