“Permission denied” on a file whose own mode looks fine is usually a parent folder that blocks the way.
namei -l /var/www/html/uploads/photo.jpg
namei follows the path one component at a time and prints the owner, group and mode of each, symlinks included. The first line without x for your user is the culprit. Run it as the user that gets the error, or with sudo -u. It is in util-linux, so it is already installed on Debian and Ubuntu. Add -x to mark mount points with a D instead of a d.
Further reading: namei manual page