Hi Jens,
I had this very annoying same problem on a CentOS 7, PHP 7.3, Moodle 3.9.1.
I´ve tried change permissions with chmod, etc, etc, without success.
After a lot of web digging I´ve found a solution. In my case it was a SELinux config issue.
You can see the SELinux status with
# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
Look for the "Current mode:" line.
I set then a temporary change in SELinux permissions mode to <permissive> with
# setenforce 0 (setenforce permissive)
This changes the mode from <enforcing> to <permissive>
# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
After installing the plugins I wanted, I changed back to <enforcing> mode with
setenforce 1
Wish you luck.
Rubens
Note: you must have root access to moodle server