How to set folder permissions and ownership for Apache website data
Whenever I upload a new folder to my website, I set its permissions and ownership:
sudo chmod -R g+rw /var/www/my-website.com/new-folder/
sudo chown -R www-data:www-data /var/www/my-website.com/new-folder/