Turns out the issue is with selinux
I found this answer, which solved my problem.
Prove this is the problem by turning off
selinuxwith the commandsetenforce 0This should allow writing, but you’ve turned off added security
server-wide. That’s bad. Turn SELinux backsetenforce 1Then finally use SELinux to allow writing of the file by using this
commandchcon -R -t httpd_sys_rw_content_t storageAnd you’re off!