xqwu2k
By:
xqwu2k

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

January 17, 2016 1.4k views
Apache WordPress

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.

3 comments
  • 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?

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

1 Answer

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

Have another answer? Share your knowledge.