Cant write to files or create new ones.

Hello I'm running CentOS 7 (LAMP) with PHP 7.3 and I can't write to files, I've checked via "is_writable" function in PHP. I even have SELINUX disabled and it's not working. I've done:

> chown -hR root:root /var/www/html

If anyone has any solutions please let me know, I'd appreciate it. 😐️


  • Presumably you're web server is not running as root. Assuming it's running as user "www", you'd need to use "www:www" not "root:root"

    However, it's dodgy to setup a server if you don't understand file permissions - for a start, only files that need to be writeable should be - Any php files *should* be owned by root, so no exploit can change them.

    If things still don't work, you'd probably be better off asking on a php/linux related forum - your issue isn't specific to vultr, and these forums are VERY quiet!


Sign In or Register to comment.