permission denied writing to var www even after chmod
RHEL 9, nginx with php-fpm, and the app can't write uploads to /var/www/html/uploads. Directory is 775 and owned root:www-data, php-fpm runs as www-data, POSIX permissions look fine. Still get Permission denied in the PHP error log. chmod 777 didn't help, which is when I remembered SELinux. getenforce says Enforcing. ls -Z /var/www/html/uploads shows unlabeled_t on one of the parent dirs. What's the proper fix, and please don't say setenforce 0.
4 replies