UID changes for clickpkg user breaks app updates/installs

Bug #1259253 reported by Alan Pope 🍺🐧🐱 πŸ¦„ on 2013-12-09
This bug affects 2 people
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Colin Watson

Bug Description

The UID for the 'clickpkg' user is not hardcoded, so may change from one build to the next. As a result the /opt/click.ubuntu.com path may become unwritable for the clickpkg user.

Steps to reproduce.

Install Ubuntu Touch image 32 on mako
Create a single sign-on account
Install an application
Update phone to #55
Install another application
Observe the install fails

/opt/click.ubuntu.com is no longer owned by clickpkg user


Just updated to #55 on mako and tried to install an app. The download/install failed (log file fragment attached).

2013-12-09 17:14:09,845 - DEBUG - "Fatal error: /home/phablet/.local/share/ubuntu-download-manager/Downloads/com.ubuntu.developer.doflah.realtai_0.1_all.click failed to install.
Cannot install /home/phablet/.local/share/ubuntu-download-manager/Downloads/com.ubuntu.developer.doflah.realtai_0.1_all.click: Cannot acquire permission to write to /opt/click.ubuntu.com; either run as root with --user, or use "pkcon install-local" instead

Looks like permissions have become screwy on /opt/click.ubuntu.com

drwxr-xr-x 3 root root 4096 Dec 3 14:08 opt
drwxr-xr-x 133 dnsmasq ssh 8192 Dec 2 20:57 click.ubuntu.com

Every folder inside /opt/click.ubuntu.com is owned by dnsmasq

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ubuntu-download-manager 0.2+13.10.20131016.1-0ubuntu1
Uname: Linux 3.4.0-3-mako armv7l
ApportVersion: 2.12.7-0ubuntu1
Architecture: armhf
Date: Mon Dec 9 17:18:58 2013
InstallationDate: Installed on 2013-12-09 (0 days ago)
InstallationMedia: Ubuntu Trusty Tahr (development branch) - armhf (20131209.1)
Β TERM=linux
Β PATH=(custom, no user)
Β SHELL=/bin/bash
SourcePackage: ubuntu-download-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Comparing two phones

alan@deep-thought:~$ diff passwd_32 passwd_55
< syslog:x:101:103::/home/syslog:/bin/false
< usermetrics:x:102:104:User Metrics:/var/lib/usermetrics:/bin/false
< messagebus:x:103:105::/var/run/dbus:/bin/false
< usbmux:x:104:46:usbmux daemon,,,:/home/usbmux:/bin/false
< dnsmasq:x:105:65534:dnsmasq,,,:/var/lib/misc:/bin/false
< clickpkg:x:106:108::/nonexistent:/bin/false
> syslog:x:101:104::/home/syslog:/bin/false
> usermetrics:x:102:105:User Metrics:/var/lib/usermetrics:/bin/false
> messagebus:x:103:106::/var/run/dbus:/bin/false
> clickpkg:x:104:107::/nonexistent:/bin/false
> usbmux:x:105:46:usbmux daemon,,,:/home/usbmux:/bin/false
> dnsmasq:x:106:65534:dnsmasq,,,:/var/lib/misc:/bin/false

So the user clickpkg was uid 106 and is now 104, causing the perms on all the files in /opt/click.ubuntu.com to be wrong.

/etc/passwd from a phone running image 32

/etc/passwd from a phone running #55

summary: - Application fails to install after downloading #55 mako
+ UID changes for clickpkg user breaks app updates/installs
no longer affects: ubuntu-download-manager (Ubuntu)
description: updated
Changed in livecd-rootfs (Ubuntu):
importance: Undecided → High
Colin Watson (cjwatson) on 2013-12-09
affects: livecd-rootfs (Ubuntu) → click (Ubuntu)
Changed in click (Ubuntu):
status: New → Triaged
Colin Watson (cjwatson) on 2013-12-10
Changed in click (Ubuntu):
status: Triaged → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
importance: High → Critical
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.13

click (0.4.13) trusty; urgency=low

  [ Robert Bruce Park ]
  * Ignore click packages when building click packages.

  [ Colin Watson ]
  * If "click build" or "click buildsource" is given a directory as the
    value of its -m/--manifest option, interpret that as indicating the
    "manifest.json" file in that directory (LP: #1251604).
  * Ensure correct permissions on /opt/click.ubuntu.com at boot, since a
    system image update may have changed clickpkg's UID/GID (LP: #1259253).
 -- Colin Watson <email address hidden> Tue, 10 Dec 2013 14:33:42 +0000

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

Other bug subscribers