Hi there, I have a question, If we follow the instructions to implement a web server with apache on Ubuntu 18.04, why do we use the root user (or sudo user granted privileges) in the installation process? From what I’ve seen they use www-data user, because of security. Is that OK? Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @ericferrando92
Could you please let me know if you refer to to this article:
As the article says “In order to complete this tutorial, you will need to have an Ubuntu 18.04 server with a non-root sudo-enabled user account”
As for the user with which Apache (and the individual sites) run on the server this can be modified.
If you’re just running apache, serving static files and things, www-data is enough.
If you have a whole bundle of applications also running in apache (in modphp, modperl etc) you end up with lots of your own, custom, internet-facing code running as www-data, which gives the bad guys more of a chances to gain access to that user, and puts them in control of more stuff if they do.
Hope this helps!
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.