Does it pose a security risk if I change the owner of the document root on Apache?
I've been spoiled by generic website hosting providers. I'm used to SFTPing my files over to the host and hitting refresh to make sure the changes have taken effect.
Now I've invested in cloud hosting with root access to a real (well, virtual) server. My document root is owned by the root user and right now I have to transfer the files to my home directory on the server then copy them to the document root with sudo cp
. Every time I do this, I have to type my long, unrememberable, randomly-generated password (stuck to my monitor with a post-it note :)).
I'd love to sudo chown user:user /var/www/html
so I can just transfer the files directly there, but I'm concerned about security.
Would it be less of a problem if I just changed the group of the directory and added my user to that group? Is the www-data
group safe to use for that?