Question

I can't seem to grant myself write permissions to the var/www/html directory

I’ve installed Centos 7 and created a Super user (user01) by adding it to the wheel group. I then installed WordPress and then logged onto server via FileZilla as user01 and tried to upload a new theme to the /var/www/html/wp-content/themes folder. But the file transfers failed due to lack of write/edit permission to that folder.

Why?

And how to get this resolved. Thanks.

Subscribe
Share

Thanks. I changed the ownership from apache to user01 (chown user01:apache <file/folder> -fv, it seems to work now.

Which user/group are the rest of the files associated with? You could change the ownership of files/directories you need to with chown:

# chown user:group <file/folder> -fv

I guess the var/www/html folder was created and owned by root, but as a Super User how to get such permission to write to this and all sub-folders?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @davidwashere:

Which user/group are the rest of the files associated with? You could change the ownership of files/directories you need to with chown:

# chown user:group <file/folder> -fv

View the original comment