Building native apps
Gábor Paller
gaborpaller at gmail.com
Wed Feb 18 15:14:53 UTC 2015
I ran into one more apparmor issue. My apparmor file currently looks like:
{
"template": "default",
"policy_vendor": "ubuntu-snappy",
"policy_version": 1.3,
"policy_groups": [
"networking"
],
"read_path": [
"/dev/video0",
"/home/ubuntu/"
],
"write_path": [
"/dev/video0",
"/home/ubuntu/"
]
}
I added /home/ubuntu because I want to save output files there, e.g.
/home/ubuntu/1.jpg.
Now I bump the version, install the package but still, the output file
cannot be saved.
root at localhost:~/snappy-bin# ./fswebcam.fswebcam -d /dev/video0 2_2.jpg
...
Error opening file for output: 2_2.jpg
fopen: Permission denied
The thing works perfectly when invoked directly from under the /apps tree.
Regards,
Gabor
On Tue, Feb 17, 2015 at 7:18 PM, Sergio Schvezov <
sergio.schvezov at canonical.com> wrote:
> On martes, 17 de febrero de 2015 13h'45:52 UTC, Gábor Paller wrote:
>
>> Thanks, Sergio, this was a very useful example. Something is still not
>> right on my side, however.
>>
>> I restructured my package according to your example and created an
>> apparmor
>> file. Here is the apparmor file right from the device (to prove that it
>> was
>> correctly packaged and installed :-))
>>
>
> Apparmor hooks only run if you bump the version (reinstalling over the
> same version that was installed will not run the hooks).
>
>
>
>
> --
> Sent using Dekko from my Ubuntu device
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20150218/32ccee06/attachment.html>
More information about the snappy-app-devel
mailing list