error setting ownership of symlink `<..>/hot.json.dpkg-new': Operation not permitte

Bug #1220125 reported by Daniel Holbach
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Trying to install ureadit from the software store, I get:

(Reading database ... 0 files and directories currently installed.)
Unpacking com.ubuntu.developer.mhall119.ureadit (from .../com.ubuntu.developer.mhall119.ureadit-0.9.2.click) ...
dpkg: error processing /home/phablet/.local/share/download_manager/{59168886-2ef7-41ed-bae7-1f4c1f98a505}/com.ubuntu.developer.mhall119.ureadit-0.9.2.click (--install):
 error setting ownership of symlink `/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /home/phablet/.local/share/download_manager/{59168886-2ef7-41ed-bae7-1f4c1f98a505}/com.ubuntu.developer.mhall119.ureadit-0.9.2.click
Traceback (most recent call last):
  File "/usr/bin/click", line 84, in <module>
    sys.exit(main())
  File "/usr/bin/click", line 79, in main
    mod.run(args)
  File "/usr/lib/python3/dist-packages/click/commands/install.py", line 41, in run
    installer.install(package_path, user=options.user)
  File "/usr/lib/python3/dist-packages/click/install.py", line 264, in install
    env=env, **kwargs)
  File "/usr/lib/python3.3/subprocess.py", line 544, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dpkg', '--force-not-root', '--force-bad-path', '--instdir', '/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2', '--admindir', '/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/.click', '--path-exclude', '*/.click/*', '--log', '/opt/click.ubuntu.com/.click/log', '--no-triggers', '--install', '/home/phablet/.local/share/download_manager/{59168886-2ef7-41ed-bae7-1f4c1f98a505}/com.ubuntu.developer.mhall119.ureadit-0.9.2.click']' returned non-zero exit status 1
root@ubuntu-phablet:/#

Tags: appstore

Related branches

Revision history for this message
Daniel Holbach (dholbach) wrote :
tags: added: appstore
Revision history for this message
Loïc Minier (lool) wrote :

I can reproduce this and straced the whole of packagekitd doing the install; the failing syscall seems to be lchown32 on a newly created symlink:

1893 read(8, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
1893 lstat64("/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json", 0xbeca0c90) = -1 ENOENT (No such file or directory)
1893 rename("/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json.dpkg-tmp", "/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json") = -1 ENOENT (No such file or directory)
1893 rmdir("/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json.dpkg-new") = -1 ENOENT (No such file or directory)
1893 rmdir("/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json.dpkg-tmp") = -1 ENOENT (No such file or directory)
1893 symlink("frontpage.json", "/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json.dpkg-new") = 0
1893 lchown32("/opt/click.ubuntu.com/com.ubuntu.developer.mhall119.ureadit/0.9.2/debug/hot.json.dpkg-new", 0, 0) = -1 EPERM (Operation not permitted)
1893 write(2, "dpkg: error processing /home/pha"..., 322) = 322

dpkg-deb -c com.ubuntu.developer.mhall119.ureadit-0.9.2.click\?noauth\=1 |grep hot
lrwxrwxrwx root/root 0 2013-03-23 15:57 ./debug/hot.json -> frontpage.json
lrwxrwxrwx root/root 0 2013-03-23 16:06 ./debug/r/ubuntu/hot.json -> ../ubuntu.json

phablet@ubuntu-phablet:~$ dpkg-deb -c com.ubuntu.developer.mhall119.ureadit-0.9.2.click\?noauth\=1 |grep frontpage
-rw-rw-r-- root/root 40728 2013-03-23 15:47 ./debug/frontpage.json
lrwxrwxrwx root/root 0 2013-03-23 15:57 ./debug/hot.json -> frontpage.json

dpkg-deb -c com.ubuntu.developer.mhall119.ureadit-0.9.2.click\?noauth\=1 |grep ^l
lrwxrwxrwx root/root 0 2013-03-23 15:57 ./debug/hot.json -> frontpage.json
lrwxrwxrwx root/root 0 2013-03-23 16:06 ./debug/r/ubuntu/hot.json -> ../ubuntu.json

Cheers,

Revision history for this message
Colin Watson (cjwatson) wrote :

Already fixed yesterday in bzr.

Changed in click (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.2

---------------
click (0.4.2) saucy; urgency=low

  * Suppress dpkg calls to lchown when not running as root (LP: #1220125).
 -- Colin Watson <email address hidden> Tue, 03 Sep 2013 10:12:29 +0100

Changed in click (Ubuntu):
status: Fix Committed → Fix Released
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.