In the "Build a nodejs service" tutorial, at step 4 the app fails to run in jailmode with snapd >=2.20 #70

Open
oSoMoN opened this Issue Jan 20, 2017 · 3 comments

Comments

Projects
None yet
3 participants

oSoMoN commented Jan 20, 2017

I’m following the "Build a nodejs service" tutorial, and everything works fine until step 4. At that point, I’m seeing that:

$ snap try prime/ --jailmode
chuck-norris-webserver 1.0.0 mounted from […]/snap-codelabs-code/build-a-nodejs-service/start/prime

$ sudo chuck-norris-webserver.node-service
cannot snap-exec: cannot read info for "chuck-norris-webserver": stat /var/lib/snapd/snaps/chuck-norris-webserver_x1.snap: permission denied

I’m on xenial, I’ve tested both with snapd 2.20 and 2.21 (from -proposed). Same error.

Contributor

WillMoggridge commented Feb 1, 2017

Thanks for this. Can I just check that your pull request #71 is seperate from this?

I will pass this information along to our copy team.

oSoMoN commented Feb 1, 2017

Yes indeed, the changes in pull request #71 were minor cosmetic changes, this issue is an actual blocker that prevents me from completing the tutorial.

I got the same error and noticed the following errors in snappy-debug

= AppArmor =
Time: May 14 01:54:27
Log: apparmor="DENIED" operation="capable" profile="snap.chuck-norris-webserver.node-service" pid=31226 comm="snap-exec" capability=1  capname="dac_override"
Capability: dac_override
Suggestions:
* adjust program to not require 'CAP_DAC_OVERRIDE' (see 'man 7 capabilities')
* add one of 'log-observe' to 'plugs'
* do nothing if program otherwise works properly

true enough, adding log-observe to plugs and then connecting it solved the problem and i could get expected results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment