Permission denied SystemError when launching

Bug #746589 reported by Michael Terry
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu One Control Panel
Triaged
Low
Ubuntu One Client Engineering team
ubuntuone-client (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: ubuntuone-client

ubuntuone-control-panel-gtk crashes when launching with the following stacktrace:

Traceback (most recent call last):
  File "/usr/bin/ubuntuone-control-panel-gtk", line 65, in <module>
    switch_to=options.switch_to, alert=options.alert)
  File "/usr/lib/pymodules/python2.7/ubuntuone-control-panel/ubuntuone/controlpanel/gtk/gui.py", line 1578, in __init__
    self.control_panel = ControlPanel(main_window=self)
  File "/usr/lib/pymodules/python2.7/ubuntuone-control-panel/ubuntuone/controlpanel/gtk/gui.py", line 1527, in __init__
    self.management = ManagementPanel(main_window=main_window)
  File "/usr/lib/pymodules/python2.7/ubuntuone-control-panel/ubuntuone/controlpanel/gtk/gui.py", line 1464, in __init__
    self.services.load()
  File "/usr/lib/pymodules/python2.7/ubuntuone-control-panel/ubuntuone/controlpanel/logger.py", line 76, in inner
    res = f(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/ubuntuone-control-panel/ubuntuone/controlpanel/gtk/gui.py", line 1159, in load
    logger.info('load: has_desktopcouch? %r', self.has_desktopcouch)
  File "/usr/lib/pymodules/python2.7/ubuntuone-control-panel/ubuntuone/controlpanel/gtk/gui.py", line 1126, in has_desktopcouch
    return self.package_manager.is_installed(self.DESKTOPCOUCH_PKG)
  File "/usr/lib/pymodules/python2.7/ubuntuone-control-panel/ubuntuone/controlpanel/gtk/package_manager.py", line 48, in is_installed
    cache = apt.Cache()
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 88, in __init__
    self.open(progress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 130, in open
    self._list.read_main_list()
SystemError: E:Opening /etc/apt/sources.list.d/private-ppa.launchpad.net_commercial-ppa-uploaders_volleybrawl_ubuntu.list - ifstream::ifstream (13: Permission denied)

Revision history for this message
Michael Terry (mterry) wrote :

(this was in a guest session)

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

I'm assigning to the ubuntuone-control-panel project, since this trace is caused in that source code.

The Ubuntu One control panel uses apt.cache library to query for package availability, but that library is crashing if it can't read a sources file that has some custom/restricted permission set.

I think we should make the control panel robust in this situation so it doesn't break, but we also need that the underlying library handles this case properly.

Changed in ubuntuone-client (Ubuntu):
status: New → Invalid
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

I filed bug #746625 for python-apt.

Changed in ubuntuone-control-panel:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

So, python-apt closed the bug as Invalid. We may be more robust on the control panel side, but there isn't much else we can do.

Revision history for this message
Michael Vogt (mvo) wrote :

The reason some of the files are 640 is because they contain private ppas. What do you use python-apt for in this context? Maybe we can find a solution that works even with the permission problem.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Hi Michael,

We use python-apt to access the Cache and check if desktopcouch-ubuntuone (and some other couchdb packages) are installed. We need to do so to enable some replication services, and those packages are not shipped in the CD anymore (so is very likely they are not present).

We could catch the exception, but if the underlying layer will fail without going over the sources that does have read perm, there isn't much we can do. The apt guys suggest that we shouldn't be setting 640 as file mode nor be adding passwords in the sources files (see bug #746625).

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.