Comment 14 for bug 1315386

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

AppArmor has rudimentary support for translations of xdg user dirs, but note, supporting translated directories on the phone has been ruled out because they are problematic for a whole bunch of reasons, instead the toolkit should handle these for the user rather than handling it in the filesystem.

So, we could've added this to write_path:
owner @{HOME}/Music/Imported/ r,
owner @{HOME}/Music/Imported/** rwk,

but as pointed out, we can't now. We could add the music_files policy group, which uses:
# Usage: reserved
owner @{HOME}/Music/ r,
owner @{HOME}/Music/** rwk,

but then that gets us back to the music-app having full access to all the music files which is one thing we were trying to avoid (we want a system where a 3rd party music app only needs to use the 'common' policy groups). This could be resolved by setting the import directory to ~/.local/share/com.ubuntu.music/imported and then have a symlink from @{HOME}/Music/Imported to ~/.local/share/com.ubuntu.music/imported. Something other than the music-app has to create the symlink.