maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Executing ./ command in shell - Access denied (https://talk.maemo.org/showthread.php?t=57511)

bandario 2010-07-01 00:05

Executing ./ command in shell - Access denied
 
Hi guys.
New to N900 and loving it but have come unstuck with trying to execute binaries from the shell.

I have got

sudo gainroot

working properly but no matter what I do I always seem to get a 'permission denied' error when trying to execute any binaries by using ./

I can't figure out a way to launch binary files from the gui.

For the record I am trying to hack and slash KBDD and btkbd into running on my phone - any help would be fantastic!
TIA
Have searched this forum extensively before posting btw - cannot find anything related.

fatalsaint 2010-07-01 00:07

Re: Executing ./ command in shell - Access denied
 
In order to execute commands using ./ you need to be in the same directory as the the file, and it needs to be executable (chmod +x filename).

bandario 2010-07-01 00:14

Re: Executing ./ command in shell - Access denied
 
I have already executed chmod +x on both files successfully and I am in the directory but it still spits out "Permission denied"


Any other reasons off the top of your head?

fatalsaint 2010-07-01 00:29

Re: Executing ./ command in shell - Access denied
 
are they text files? need to start with:

#!/bin/bash

If bash.. or python if python.. etc.

MohammadAG 2010-07-01 00:34

Re: Executing ./ command in shell - Access denied
 
chmod +x is useless on VFAT (MyDocs is mounted noexec), make sure the files aren't in MyDocs.

Benson 2010-07-01 00:35

Re: Executing ./ command in shell - Access denied
 
The internal SD mounted at MyDocs is mounted noexec by default -- moreover, since vfat doesn't have an execute bit, you have either everything executable, or nothing.

Simplest fix: get your stuff out of MyDocs.

Edit: Heh, ninjaed.

fatalsaint 2010-07-01 00:35

Re: Executing ./ command in shell - Access denied
 
hahah.. yeah.. what they said too.. i keep forgetting that as I reformatted my MyDocs rofl.

vitaminj 2010-07-01 00:37

Re: Executing ./ command in shell - Access denied
 
If you're in MyDocs, that partition is mounted as noexec, so you won't be able to run or +x anything. Try moving the files higher up, into your home directory, or into /opt/.

bandario 2010-07-01 01:26

Re: Executing ./ command in shell - Access denied
 
1 Attachment(s)
No dice :|

I got a bit excited then but it still eludes me.
Thanks so much for the help though guys. I will keep searching!

bandario 2010-07-01 01:27

Re: Executing ./ command in shell - Access denied
 
HOLY HELL!

Did another chmod +x in new location and it launched!

One step closer.

Thanks so much.


All times are GMT. The time now is 22:54.

vBulletin® Version 3.8.8