Failed to open stream:Permission denied in FileCache.inc.php on line 90

Hello, after upgrade a version ojs 2.4.8 to 3.2.1-1 the system not save the changes on administrative settings. The system show the error ----------- file_put_contents(/cache/fc-pluginSettings-0-defaultthemeplugin.php): failed to open stream: Permission denied in /lib/pkp/classes/cache/FileCache.inc.php on line 90.

But if update the system to ojs3.1.2-4 the system not give the previous error but the button to schedule for publication vanished.

Someone have the same problems? How to solve?

Thanks a lot.

Hi,
did you give the web server write permission on the cache directory and its subdirectories, as outlined in the installation instructions?

1 Like

chown -R www-data:www-data ojs3 directory

The permission are correct, and to confirm this the error not occurs whith the 3.1.x version. Demands other explanation. Thanks.

Hi @alerbra,

This sets ownership and a group. Do they have write permissions?

Hi, to left no doubt i changed the permissions to 777 and the owner www-data:www-data to entire ojs folder and the error remains.


An unexpected error occurred. You may have been logged out. Please reload the page and try again.

The permissions is not the way to solve this problem, is something else, even the previous version 3.1.X not give this error. Is a code 3.2 problem ???

Do you see this error message in the log after setting up permissions? Are there any other relevant errors there?

The error that remains is An unexpected error occurred. You may have been logged out. Please reload the page and try again. and a log error that refer to ojs2: 404 Not Found, referer: http://127.0.0.1/admin/settings. Thanks a lot.

But the system not allow to make a administrative changes, can not save.

So, that’s another issue. Before moving forward, don’t forget to set more strict permissions for folder that don’t require public access. 777 for entire ojs root folder most often isn’t safe.

This looks like page controller can’t handle operation for some reason. There are several similar topics on the forum, do you already tried solutions described there? e.g.: An unexpected error occurred. You may have been logged out. Please reload the page and try again