I found that this is caused not by PIL but by libjpeg-turbo: https://bugs.launchpad.net/libjpeg-turbo/+bug/1020872 This happens if your Python executable is setcapp'ed or otherwise creates /proc/self/* files with owner UID=0.
See my bug hunt here: http://lukasz.langa.pl/5/error-opening-file-for-reading-permission-denied/
Summing up, this should be declared a duplicate of 1020872. If you're affected, vote on that other bug instead.
I found that this is caused not by PIL but by libjpeg-turbo: https:/ /bugs.launchpad .net/libjpeg- turbo/+ bug/1020872
This happens if your Python executable is setcapp'ed or otherwise creates /proc/self/* files with owner UID=0.
See my bug hunt here: http:// lukasz. langa.pl/ 5/error- opening- file-for- reading- permission- denied/
Summing up, this should be declared a duplicate of 1020872. If you're affected, vote on that other bug instead.