trisma
September 25, 2018, 7:48am
#1
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/FileManager.inc.php on line 289, referer: http://192.168.89.20/index.php/naragama/submission/wizard/2?submissionId=2279
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/FileManager.inc.php on line 119, referer: http://192.168.89.20/index.php/naragama/submission/wizard/2?submissionId=2279
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/FileManager.inc.php on line 119, referer: http://192.168.89.20/index.php/naragama/submission/wizard/2?submissionId=2279
PHP Fatal error: Call to a member function getFileId() on null in /home/jhon/ojs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065, referer: http://192.168.89.20/index.php/naragama/submission/wizard/2?submissionId=2279
NateWr
September 25, 2018, 9:56am
#2
Hi @trisma ,
It looks like the server does not have permission to save the file in the files directory that is specified under config.inc.php
. You’ll need to check the permissions on that directory to make sure the server can create files and directories.
trisma
September 26, 2018, 9:57am
#3
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
NateWr
September 26, 2018, 10:06am
#4
What are the permissions on the subdirectories of masterfile
?
trisma
September 27, 2018, 1:30am
#5
yeah, it worked after I changed 777 permissions, before 755.
Thanks Natewr
anupent
September 27, 2018, 1:39am
#6
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,
trisma
September 27, 2018, 2:03am
#7
@anupent The masterfile is not in the root directory. but it is equivalent to the directory for ojs. is there a recommendation from you?
kawahyu
January 5, 2019, 12:58pm
#9
Hi @trisma Did you solve the HTTP error? I got the same issue
trisma
January 9, 2019, 8:45am
#10
Yes sure, just check on your directory permissions