So, I am running Debian Stretch with a LAMP server and vsFTPd. When ever I upload a new file or create a new file in the /var/www/html directory with a code editing program, I am unable to view the file/image/what-be-it, until I apply 777 permissions to the /var/www/html folder. I know this is not the best solution but I have ran through several iterations of trying
sudo chown $USER:www-data /var/www/mysite sudo chmod -R 775 /var/www sudo usermod -a -G www-data [my username]
and the similar with no luck. How would I go about trouble shooting and eventually solving this issue so I do not need to putty into the server every time I upload some images or a new page to reset permissions.
the www folder has
while any subfolder/file created starts with