need help with freedomotic snappy app

Steve Langasek steve.langasek at canonical.com
Mon Apr 27 07:01:29 UTC 2015


Hi Mauro,

On Sun, Apr 26, 2015 at 02:09:35PM -0500, mauro at freedomotic.com wrote:

> I'm trying to create a snappy app for our open source domotic framework
> freedomotic.com
> I created a .snap package and uploaded it on raspberry 2 using ssh.
> Installation ok and in snappy-bin folder a freedomotic.freedomotic.sh file
> is available.
> Also I installed java 7 required by the software (manually because no java
> app is on the store).
> The problem is that freedomotic needs to be run as superuser.
> Even If I run as sudo su I have the following output:

> root at localhost:/home/ubuntu# ./snappy-bin/freedomotic.freedomotic.sh
> Your java version is
> /apps/freedomotic/5.6.0/bin/freedomotic.sh: 7:
> /apps/freedomotic/5.6.0/bin/freedomotic.sh: java: Permission denied
> Strarting Freedomotic...
> Running with: java -jar /apps/freedomotic/5.6.0/bin/freedomotic.jar
> /apps/freedomotic/5.6.0/bin/freedomotic.sh: 13: exec: java: Permission denied

> Any idea?
> The file in bin has the following permissions
> root at localhost:/home/ubuntu/snappy-bin# ls -l
> total 4
> -rwxr-xr-x 1 ubuntu ubuntu 719 Jan  1 00:53 freedomotic.freedomotic.sh

> If you want to try and give us some help the snap is downloadable from
> http://virtualcalcio.com/freedomotic_5.6.0_all.snap

How did you install java?  The error message suggests that java itself is
not executable, or is being blocked by the apparmor policy for the snap.

The snappy approach to this problem is to bundle openjdk in your snap
package.  At that point there would be no permissions problems since your
app would be allowed to execute the binaries that are shipped as part of the
snap package itself.

As for running as superuser: why does your package need this?  A snap
application package won't have root on a snappy system, but there may be
another solution for snappy to mediate access to whatever privileged
resources your application needs.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150427/cf4885cc/attachment-0001.pgp>


More information about the snappy-devel mailing list