Score:0

Best practice for webserver setup with no root user

in flag

I apologize if this is messy and I have been searching google for best practices but can't seem to find an answer.

I am setting up a web server without a root user. I wanted to add a user with sudo privileges so they can do anything that needs to be done on the server though command line. That part I accomplished.

The advice I need is how to structure the server so the user can upload files to the www directory and also be able to upload apache config files using a SFTP software like Filezilla. Should I make www (and sub directories) the ownership of the user and also the sites-available folder? What is the best practice when creating a web server?

Thank you for any advice you can offer.

Wally Kolcz avatar
in flag
So I found the answer for this question from another post: sudo adduser <username> www-data sudo chown -R www-data:www-data /var/www sudo chmod -R g+rwX /var/www
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.