[Bug 1028396] Re: "Permission denied" while importing _imaging

Łukasz Langa 1028396 at bugs.launchpad.net
Sat Aug 18 19:49:06 UTC 2012


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.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-imaging in Ubuntu.
https://bugs.launchpad.net/bugs/1028396

Title:
  "Permission denied" while importing _imaging

Status in “python-imaging” package in Ubuntu:
  Confirmed

Bug description:
  STEPS TO REPRODUCE:

  1. Install python-imaging

  $ sudo apt-get install python-imaging

  2. launch a Python shell and import _imaging

  $ python
  Python 2.7.3 (default, Apr 20 2012, 22:39:59) 
  [GCC 4.6.3] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import _imaging

  EXPECTED OUTPUT:

  None, it's only an import.

  ACTUAL OUTPUT:

  Error opening file for reading: Permission denied

  ADDITIONAL INFO:

  The _imaging library is actually /usr/lib/python2.7/dist-
  packages/PIL/_imaging.so and the error is probably not thrown by this
  file but by some of its dependencies. The library itself works fine
  besides that strange error message. Rudimentary stracing didn't give
  any results:

  $ strace python -c "import _imaging" 2>&1 | grep Permission

  (returned no output)

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: python-imaging 1.1.7-4
  ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
  Uname: Linux 3.2.0-23-generic x86_64
  ApportVersion: 2.0.1-0ubuntu5
  Architecture: amd64
  Date: Wed Jul 18 22:47:07 2012
  InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release amd64 (20120424.1)
  ProcEnviron: Error: [Errno 13] Permission denied: '/proc/20269/environ'
  SourcePackage: python-imaging
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-imaging/+bug/1028396/+subscriptions




More information about the foundations-bugs mailing list