Failed to upload title page image for the issue

Describe the issue or problem
I am facing this issue while uploading the Issue title page (.jpg) image. The files uploading status bar completes and then a pop up message appears ‘‘The file could not be uploaded or revised’’

Please tell us what happens and what you expected to happen.
The file does not uploades

Upon checking the error logs, i see the following error:

PHP Warning: mkdir(): Permission denied in /home/journalo/public_html/lib/pkp/classes/file/FileManager.inc.php on line 312
[24-Feb-2023 04:43:48 UTC] PHP Warning: mkdir(): Permission denied in /home/journalo/public_html/lib/pkp/classes/file/FileManager.inc.php on line 312
[24-Feb-2023 04:43:48 UTC] PHP Warning: move_uploaded_file(/home/pmsrj/public_html/uploads/temp/jpg53wxgX): Failed to open stream: No such file or directory in /home/journalo/public_html/lib/pkp/classes/file/FileManager.inc.php on line 143
[24-Feb-2023 04:43:48 UTC] PHP Warning: move_uploaded_file(): Unable to move "/tmp/php1eVBMc" to "/home/pmsrj/public_html/uploads/temp/jpg53wxgX" in /home/journalo/public_html/lib/pkp/classes/file/FileManager.inc.php on line 143

What application are you using?
OJS 3.3.0-8

Additional information
The file upload size in the php.ini is: 512 MB
max execution time is 600.

Kindly help me in fixing this issue

Hi @KMC,

This is a file permissions problem – but beyond that, it’s unsafe to keep your files directory inside the web root. Make sure to move it somewhere that its contents cannot be directly accessed!

Regards,
Alec Smecher
Public Knowledge Project Team

The file directory is outside public html

Hi @KMC,

From the message above, it appears to be called “uploads” and sits inside public_html.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you Asmecher, i moved the upload folder outside public_html and also updated the directory path in the config.ini and now its working

1 Like

This topic was automatically closed after 7 days. New replies are no longer allowed.