Six Axis Pairing Script Problem

Following Using the PlayStation 3 controller in Bluetooth mode with Linux

I am able to compile the sixpair.c script but am unable to execute it I get the error message:

jgehrig@linux-abja:~> ./sixpair
bash: ./sixpair: Permission denied

I have tried executing the file as root but get the same effect.

same with another app (ys flight simulator)


jgehrig@linux-abja:~/Desktop/YSFlight/ysflight> ysflight
bash: ./ysflight: Permission denied

Am I doing something wrong? How can I make these two applications work?

jgehrig wrote:
> Following ‘Using the PlayStation 3 controller in Bluetooth mode with
> Linux’ (http://www.pabr.org/sixlinux/sixlinux.en.html)
>
> I am able to compile the sixpair.c script but am unable to execute it I
> get the error message:
>
> Code:
> --------------------
> jgehrig@linux-abja:~> ./sixpair
> bash: ./sixpair: Permission denied

  1. Make sure ./sixpair is indeed the program you compiled with ‘file sixpair’
  2. Run ‘strace sixpair’ and see where the program abends.

It’s the right file…

when copied to tmp it allows me to execute it

Here’s the output
execve("./sixpair", “./sixpair”], /* 82 vars */]) = -1 EACCES (Permission denied)
dup(2) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), …}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8039000
_llseek(3, 0, 0xbfe543c8, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Permission denied
", 32strace: exec: Permission denied
) = 32
close(3) = 0
munmap(0xb8039000, 4096) = 0
exit_group(1)

My guess it that the partition you are executing the program in was mounted with the noexec option. mount will show you the options on the mounts.

jgehrig wrote:
> It’s the right file…
>
> when copied to tmp it allows me to execute it
>
> Here’s the output
> execve("./sixpair", “./sixpair”], /* 82 vars */]) = -1 EACCES
> (Permission denied)
> dup(2) = 3
> fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
> fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), …}) = 0
^^^^

Did you make the program executable?

Juist compiling a source doesn’t do that…

See e.g.:
$ll filestats.sh
-rw------- 1 theo users 664 Nov 10 2006 filestats.sh

$file filestats.sh
filestats.sh: Bourne-Again shell script text

$./filestats.sh
bash: ./filestats.sh: Permission denied