How do I fix problem with getting “permission denied” when Flask server is saving an image file

Solution
chown -R www-data:www-data /path/to/folder
chmod +x /path/to/folder 

 ServerName domain.com
 # ...
 
  Options Indexes FollowSymLinks
  AllowOverride All
  Require all granted