package-data-downloader crashed with OSError in mark_hook_failed(): [Errno 13] Permission denied: '/var/lib/update-notifier/package-data-downloads/flashplugin-installer.failed'

Bug #976761 reported by David E. Anderson on 2012-04-08
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
High
Steve Langasek

Bug Description

error reported during flashplugin post-installation data download. first error due to no net connection, then failed on retry following user approval.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: update-notifier-common 0.119ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Sun Apr 8 11:29:17 2012
ExecutablePath: /usr/lib/update-notifier/package-data-downloader
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64+mac (20120327.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/lib/update-notifier/package-data-downloader
ProcEnviron:
 TERM=xterm
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
PythonArgs: ['/usr/lib/update-notifier/package-data-downloader']
SourcePackage: update-notifier
Title: package-data-downloader crashed with OSError in mark_hook_failed(): [Errno 13] Permission denied: '/var/lib/update-notifier/package-data-downloads/flashplugin-installer.failed'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

David E. Anderson (danderson3) wrote :
tags: removed: need-duplicate-check
Steve Langasek (vorlon) wrote :

The error message in this bug report is:

package-data-downloader crashed with OSError in mark_hook_failed(): [Errno 13] Permission denied: '/var/lib/update-notifier/package-data-downloads/flashplugin-installer.failed'

Why is this error happening? This script runs as root and should have full write access to this directory.

Changed in update-notifier (Ubuntu):
status: New → Incomplete

The updater ran and asked for the password. It updated and seemed to
complete.
I turned off networking and left. When I returned, the dialogue box said
that post-update
data download had failed and asked if it should retry. I agreed, but had
not turned on the
net. It failed again. I turned on networking and said to retry. Then the
error occurred again
and continues.

Hope this helps.

On Mon, Apr 9, 2012 at 9:04 PM, Steve Langasek <<email address hidden>
> wrote:

> The error message in this bug report is:
>
> package-data-downloader crashed with OSError in mark_hook_failed():
> [Errno 13] Permission denied: '/var/lib/update-notifier/package-data-
> downloads/flashplugin-installer.failed'
>
> Why is this error happening? This script runs as root and should have
> full write access to this directory.
>
> ** Changed in: update-notifier (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/976761
>
> Title:
> package-data-downloader crashed with OSError in mark_hook_failed():
> [Errno 13] Permission denied: '/var/lib/update-notifier/package-data-
> downloads/flashplugin-installer.failed'
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/976761/+subscriptions
>

--
David

Steve Langasek (vorlon) wrote :

Aha, thanks. Took me a little bit to wrap my brain around this, but yes, I see the bug now; the 'Run this command' needs to run as root, and curently it's being run as the admin user. Will get this fixed.

To work around this problem, you can run 'sudo /usr/lib/update-notifier/package-data-downloader' from a terminal.

Changed in update-notifier (Ubuntu):
importance: Undecided → High
status: Incomplete → Triaged
assignee: nobody → Steve Langasek (vorlon)
Steve Langasek (vorlon) wrote :

Michael, we don't really want to call sudo directly here because we don't want to be prompting in a terminal for the password. What's the best way to get root access from within an update-notifier user.d hook?

Steve Langasek (vorlon) wrote :

looks like the right answer here should be policykit, which is desktop-neutral and (of course) preferred over gksudo.

Steve Langasek (vorlon) wrote :

Unfortunately, that also requires implementing this as a dbus service... which I don't think is going to happen in the short term. So gksudo it is.

Steve Langasek (vorlon) on 2012-04-13
visibility: private → public
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.119ubuntu7

---------------
update-notifier (0.119ubuntu7) precise; urgency=low

  * Use <proto>_proxy environment variables to choose the proxy to use for
    data downloads, not the apt proxy settings, because apt may be
    configured to point at a package-specific proxy. This makes proxy
    configuration a little less convenient than before for the
    flashplugin-installer package, but it at least it makes it possible to
    have a different proxy setting for packages vs. arbitrary data
    downloads, which otherwise we don't have any way to support.
    LP: #979477.
  * Stop processing after a fatal download error, not just a transient one,
    so that we can't be tricked into feeding a partial list of files to a
    handler. Thanks to Kees Cook for spotting the bug. LP: #979426.
  * Flush stdout before calling subprocess, so that log output makes more
    sense.
  * Print a more meaningful status message when downloading, instead of just
    a bare URL.
  * Check for existence of /usr/lib/update-notifier/package-data-downloader
    before trying to run it from our cron job, so that the package doesn't
    generate error messages when removed but not purged.
  * The action for our notification should call gksu instead of trying to
    run the command directly without root access. This is imperfect because
    kubuntu won't have gksudo available by default, but it's an improvement
    over failing for everybody. LP: #976761.
 -- Steve Langasek <email address hidden> Fri, 13 Apr 2012 03:49:10 +0000

Changed in update-notifier (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers