HTTP Error. Upload submission file OJS 3.1.1-4


I have finished upgrading from OJS 3.0.0 to OJS 3.1.1-4. From the beginning of the upgrade there was no problem, but I found a problem when I would create a new submission. And in the log there is an error as below:

PHP Warning: mkdir(): Permission denied in /home/jhon/ojs/lib/pkp/classes/file/ on line 289, referer:
PHP Warning: move_uploaded_file(/home/jhon/masterfile/journals/9//articles/2279/submission/2279-97-5044-1-2-20180925.pdf): failed to open stream: No such file or directory in /home/jhon/ojs/lib/pkp/classes/file/ on line 119, referer:
PHP Warning: move_uploaded_file(): Unable to move ‘/tmp/phpemlwgm’ to ‘/home/jhon/masterfile/journals/9//articles/2279/submission/2279-97-5044-1-2-20180925.pdf’ in /home/jhon/ojs/lib/pkp/classes/file/ on line 119, referer:
PHP Fatal error: Call to a member function getFileId() on null in /home/jhon/ojs/lib/pkp/classes/submission/ on line 1065, referer:

Hi @trisma,

It looks like the server does not have permission to save the file in the files directory that is specified under You’ll need to check the permissions on that directory to make sure the server can create files and directories.

This is my config:
files_dir = /home/jhon/masterfile

and this my location directory

root@ojs:/home/jhon# ls -li
656051 drwxrwxrwx 8 jhon jhon 4096 Aug 7 2017 masterfile
798764 drwxr-xr-x 18 jhon jhon 4096 Sep 26 09:53 ojsnew

What are the permissions on the subdirectories of masterfile?

yeah, it worked after I changed 777 permissions, before 755.
Thanks Natewr

Hi @trisma,
I am skeptical about security of your website with permission of 777.
You can search this forum on this subject for further information.

Best regards,

@anupent The masterfile is not in the root directory. but it is equivalent to the directory for ojs. is there a recommendation from you?

Hi @trisma Did you solve the HTTP error? I got the same issue

Yes sure, just check on your directory permissions