0

Running NGINX, MariaDB and php-fpm. Full error is:

    Sorry, there has been an error.
The uploaded file could not be moved to wp-content/uploads/2016/12.

1) Yes, I did "chown -R nginx:nginx" and "chmod -R 755" for the whole html/ directory.

2) Yes, I am using the correct directory.

3) get_current_user() in PHP returns "root" -- I would figure this is contradictive, since the root user should have complete control over the system. This is a completely separate issue imo.

Thanks, this is quite puzzling to me.

1 Answer 1

1

Turns out server has SELinux enabled.

chcon -R -t httpd_sys_content_t /var/www/html/directory_to_write
chcon -R -t httpd_sys_rw_content_t /var/www/html/directory_to_write

Should alleviate any issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.