Permissions incorrect in httplib

Bug #1241001 reported by Cefn
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-httplib2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

The permissions for files installed by httplib and dateutil seem to be incorrect. I compared read permissions across all the dist-packages and they all show "user read" permissions apart from these two. The log of permissions is attached. Forcing a reinstall via Synaptic didn't fix the issue. When running the standard instructions at http://kartograph.org/docs/kartograph.py/install-ubuntu.html I discovered the error, when load_entry_point could not inspect the toplevel.txt file, as below, and sure enough, httplib's toplevel.txt file was readable only by user root and group staff.

$ kartograph world.json -o world.svgTraceback (most recent call last):
  File "/usr/local/bin/kartograph", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2825, in <module>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 710, in subscribe
    callback(dist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2825, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2257, in activate
    self.insert_on(path)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2364, in insert_on
    self.check_version_conflict()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2403, in check_version_conflict
    for modname in self._get_metadata('top_level.txt'):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2251, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1219, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1211, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1326, in _get
    stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/EGG-INFO/top_level.txt'

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: python-httplib2 0.8-2
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic i686
ApportVersion: 2.12.5-0ubuntu2
Architecture: i386
Date: Thu Oct 17 14:55:44 2013
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: python-httplib2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Cefn (6-launchpad-net-cefn-com) wrote :
Revision history for this message
Cefn (6-launchpad-net-cefn-com) wrote :

A workaround which resolved the problem for me (but seems like it's crazy I would have to do this) was running the following commands...

cd /usr/local/lib/python2.7/dist-packages

sudo chmod a+r httplib2-0.8-py2.7.egg/EGG-INFO/* python_dateutil-2.1-py2.7.egg/EGG-INFO/*

Revision history for this message
Brian Murray (brian-murray) wrote :

As a part of setting up and installing kartograph you have installed a different version of httplib than the one provided by Ubuntu. Ubuntu provided libraries end up in /usr/lib/, while the error exists in a library in /usr/local/lib. You'll need to contact the developers of kartograph who likely provided the httplib library in /usr/local/lib.

Changed in python-httplib2 (Ubuntu):
status: New → Invalid
Revision history for this message
Cefn (6-launchpad-net-cefn-com) wrote :

I can't figure how it was kartograph, but at some point or another, some python-based installer has grabbed their own copy obviously. I suppose I can just remove it and it will fall back to the original. Worth a go, anyway. No idea what process installed it. Thanks for the debugging help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.