I got hacked yesterday, and for some reason i think this thing I've been doing on my servers over and over might have some disadvantages, Might this question be deprecated but i need simple answer as this practice i used to do, and in case it's bad why there are answers got a lot of upvotes for this practice?
sudo chown www-data:www-data /var/www -R
cd /var/www
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 755 {} \;
so i just need something as simple as these commands to protect my server. Thanks
The question is marked as duplicated but it's not my compromised server is over, i'm talking about another server and specific subject.