Using contentItem.move(dir, filename) doesn't work under confinement

Bug #1373086 reported by Andrew Hayzen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
content-hub
Fix Released
Medium
Ken VanDine
content-hub (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The music-app uses contentItem.move(dir, filename) to move files into ~/Music/Imported however while trying to add confinement back into the app it has been noted that this method does not function as expected. Any folders are created but the actual file is not renamed.

There is an example branch of the music-app under confinement here [0].

Note you may need to add the following to the apparmor profile (/var/lib/apparmor/profiles/click_com.ubuntu.music_music_1.3.634), depending which version of apparmor you are using and rerun the parser for that profile:
dbus (receive) bus=session peer=(label=/usr/bin/mediascanner-service-2.0),
dbus (bind) name="org.freedesktop.Application",

0 - https://code.launchpad.net/~andrew-hayzen/+junk/music-app-confinement-001

Related branches

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

This is the application log for music while trying to move the file [0] and the mediascanner log [1].

0 - http://pastebin.ubuntu.com/8413128/
1 - http://pastebin.ubuntu.com/8413136/

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I'm puzzled why this wouldn't work under confinement-- other confined apps work fine with content-hub. Are there any denials? Note, kernel rate limiting may be occurring, so you might need to do 'sudo sysctl -w kernel.printk_ratelimit=0' to disable it.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Also a log from the content-hub service while performing the move [2].

2 - http://pastebin.ubuntu.com/8413203/

Changed in content-hub:
assignee: nobody → Ken VanDine (ken-vandine)
Revision history for this message
Michael Hall (mhall119) wrote :

This happens also to my app, memebook, when the ContentStore.scope isn't set to ContentScope.App

3 - http://paste.ubuntu.com/8508321/

Michael Hall (mhall119)
Changed in content-hub:
status: New → Confirmed
Changed in content-hub:
status: Confirmed → In Progress
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package content-hub - 0.0+14.10.20141009-0ubuntu1

---------------
content-hub (0.0+14.10.20141009-0ubuntu1) utopic; urgency=low

  [ Ken VanDine ]
  * Fall back to a copy if move fails (LP: #1373086)

  [ Michael Sheldon ]
  * Fix packaging for translations.
 -- Ubuntu daily release <email address hidden> Thu, 09 Oct 2014 14:44:05 +0000

Changed in content-hub (Ubuntu):
status: New → Fix Released
Changed in content-hub:
status: In Progress → 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.