Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Permission on /var/www folder

$
0
0
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

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>