I upgraded ojs to ojs3.4. My PHP version is 8.3.4.
I counter by an error in uploading files when PHP is fpm. As i set it to FCGID, there is no problem. It is the reverse of my other journals.
PHP log is :
Failed to open stream: Permission denied in /home/reapress/domains/ceai.reapress.com/public_html/lib/pkp/classes/file/FileManager.php on line 185
Hi there @Jpour_Mail
It seems you may have a permission problem. Check if your webserver can write your OJS ‘files_dir’ and cache dirrectory.
Hi @Jpour_Mail,
Just to add a little bit of detail to @hilongo’s excellent advice –
Depending on how your server runs PHP scripts, PHP may end up running as a different user account. If you’re running PHP using mod_php
, for example, scripts often run under the www-data
user account. With FPM, it’s likelier that you’re running in a setuid environment, where scripts run under your own user account (e.g. on a shared server).
It’s necessary to know a little about how your server is configured in order to properly set file permissions, so I’d suggest consulting your phpinfo page. OJS doesn’t have any special requirements for file permissions – it just needs to be able to work with the contents of the files_dir
.
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks a lot
I have changed the /home/reapress/domains/ceai.reapress.com/public_html/public/site/images/admin to 0777. then did not face the error.
in other journal with the equal configuration for php, i did not change this permission.
Thanks a lot
I have changed the /home/reapress/domains/ceai.reapress.com/public_html/public/site/images/admin to 0777. then did not face the error.
I did not change this permission in another journal with an equal configuration for PHP.
Hi @Jpour_Mail,
777
permissions are never a good idea to run in production; you probably have to figure out file ownership, not just numeric permissions.
Regards,
Alec Smecher
Public Knowledge Project Team
I changed the ownership to Administration username of parent server. The problem was be solved.
Thanks alot
This topic was automatically closed after 13 days. New replies are no longer allowed.