I'm currently setting my aws centos 7 server using codeigniter4 restapi with OAuth 2.0 and php7.2. My problem is the writing permission for cache folder. I've tried this answers but nothing works.
https://forum.codeigniter.com/thread-73000.html
https://blog.lysender.com/2015/07/centos-7-selinux-php-apache-cannot-writeaccess-file-no-matter-what/
My current user is centos. I've also tried to chmod 777 -R for all the /var/www/html/ folders but the same error occurs.
EDIT: Upon posting this question. sudo chcon -t httpd_sys_rw_content_t /data/www/html/sites/mysite/logs -R did fix the problem. I know I've been testing this all day yesterday but it didn't work. Don't know why its working now. Sorry
sudo chcon -t httpd_sys_rw_content_t /data/www/html/sites/mysite/logs -R
1.4m articles
1.4m replys
5 comments
56.9k users