Report this

What is the reason for this report?

Why does one need to usermod to www-data

Posted on December 28, 2020

In many tutorials around the DO knowledge base you get a suggestion to first do

sudo usermod -aG www-data $USER

and then do

sudo chown -R www-data:www-data /var/www/

In one of my older droplets all I did was simply

sudo chown -R $USER /var/www/

and never had any problems.

Am I missing something here?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.