<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.8.5">
</HEAD>
<BODY>
<BR>
Hard to say from just your email, if you could post the files somewhere that would be helpful. My guess would be that the shell script isn't marked as executable. You can change that before building the snap by using "chmod +x hello". You might also check that you put the hello script in the bin directory of the snap. Lastly I'd look at your #! to ensure that you're using an interpreter that is installed on the system.<BR>
<BR>
HTH,<BR>
Ted<BR>
<BR>
On Mon, 2015-10-26 at 17:32 -0700, robert_joslyn@selinc.com wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
I'm trying to get a simple hello world snap working, but I'm getting a 
permission denied error when trying to run the program.

(amd64)ubuntu@localhost:~$ hello.hello
execv failed: Permission denied

It seems that AppArmor is blocking this, as this message appears in the 
kernel log:

Oct 26 23:48:11 localhost kernel: [  655.094769] audit: type=1400 
audit(1445903291.119:15): apparmor="DENIED" operation="getattr" 
info="Failed name lookup - disconnected path" error=-13 
profile="/usr/bin/ubuntu-core-launcher" name="dev/pts/0" pid=1001 
comm="ubuntu-core-lau" requested_mask="r" denied_mask="r" fsuid=1000 
ouid=1000

My package.yaml is:
name: hello
version: 0.0.1
vendor: none

binaries:
 - name: bin/hello

The hello binary is simply a shell script that prints hello world. I'm 
creating the snap with snappy build, but making it with snapcraft results 
in the same error (except it triggers on the wrapper). I've also tried 
setting security-template to unconfined, but still get the same error. Any 
thoughts as to what I'm doing wrong here? 

Thanks,

--
Robert Joslyn
Software Engineer, R&D - Automation
Schweitzer Engineering Laboratories
509-332-1890 ext. 3214

</PRE>
</BLOCKQUOTE>
<BR>
<BR>
</BODY>
</HTML>