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?
/var/www/html/classes/install/Upgrade.inc.php line 1991
FileManager-> mkdirtree ("")
/var/www/html/lib/pkp/classes/install/Installer.inc.php line 421
Upgrade-> moveReviewerFiles (Object (Upgrade), Array (1))
/var/www/html/lib/pkp/classes/install/Installer.inc.php line 265
Installer-> executeAction (Array (3))
/var/www/html/lib/pkp/classes/install/Installer.inc.php line 186
Installer-> executeInstaller ()
/var/www/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 88
Installer-> execute ()
/var/www/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 64
UpgradeTool-> upgrade ()
/var/www/html/tools/upgrade.php line 34
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.
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.
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.
Public Knowledge Project Team