Hello everyone!
I need to know if making www-data owner of the full /var/www map with the following permissions is safe;
When I do ls -l in my var/www map I get the following results;
drwxr-sr-x 5 www-data www-data 4096 site1
drwxr-sr-x 5 www-data www-data 4096 site2
drwxr-sr-x 5 www-data www-data 4096 site3
drwxr-sr-x 5 www-data www-data 4096 site4
drwxr-sr-x 2 www-data www-data 4096 HTML
My last site was hacked so I want to be sure this time.
Used the following commands (Ubuntu)
sudo chown -R www-data:www-data /var/www
sudo chmod 0755 -R /var/www
sudo chmod g+s -R /var/www
I need to know if making www-data owner of the full /var/www map with the following permissions is safe;
When I do ls -l in my var/www map I get the following results;
drwxr-sr-x 5 www-data www-data 4096 site1
drwxr-sr-x 5 www-data www-data 4096 site2
drwxr-sr-x 5 www-data www-data 4096 site3
drwxr-sr-x 5 www-data www-data 4096 site4
drwxr-sr-x 2 www-data www-data 4096 HTML
My last site was hacked so I want to be sure this time.
Used the following commands (Ubuntu)
sudo chown -R www-data:www-data /var/www
sudo chmod 0755 -R /var/www
sudo chmod g+s -R /var/www