Error "Unable to save plugin to local file"

Dear all,
I tried to install a Plugin from the gallery, but when I press "ok " in the window “Are you sure you wish to install this plugin?” nothing happens.

I checked the error log and I receive:
[Mon Dec 16 08:44:14.296847 2019] [fcgid:warn] [pid 1405:tid 139885079889664] [client 10.16.10.64:55896] mod_fcgid: stderr: ojs2: Unable to save plugin to local file!, referer: http://www.journals-dfa.supsi.ch/index.php/rivistaddm/management/settings/website

I tried with Backup and iThenticate plugins, the both give me the above error.

I need to give special permissions to a folder?
I made writable the plugins’s folder but I recived the same error.

I use OJS 3.1.2.2

thank you for help
Sela

This message occurs with the context of trying to save the plugin to the system’s temporary directory:

If you are comfortable editing PHP code, my next step would be to change the message to indicate where the file is being written, so we can see why the write is failing. That would look like:

		if (!$wrapper->save($destPath)) fatalError('Unable to save plugin to local file: '.$destPath);	

I tried but it seems that destPath is empty.

Here the new log error:
[…] Unable to save plugin to local file: , referer […]

This indicates that the call to PHP’s tempnam() function on line 252 is failing. Is there a PHP warning just above the error message in your log? It could be something like an open_basedir restriction, or a failure of sys_get_temp_dir() or a file permissions error. It is also possible that a OS level restriction is in place, such as selinux.