View Full Version : Executing .sh - permission denied
scoobyd
March 7th, 2014, 09:39 AM
Hi,
I've been trying to execute run.sh but keep getting "permission denied" even after I've made it executable by entering "chmod +x run.sh"
This is what I entered and what Terminal churned out:
username@Tosh-Ubuntu:~$ cd Desktop/linux
username@Tosh-Ubuntu:~/Desktop/linux$ chmod +x run.sh
username@Tosh-Ubuntu:~/Desktop/linux$ ./run.sh
./run.sh: line 2: ./adb: Permission denied
./run.sh: line 7: ./adb: Permission denied
Help??
TIA.
Lars Noodén
March 7th, 2014, 10:15 AM
What filesystem are you using there?
mount | grep /dev
raja.genupula
March 7th, 2014, 12:02 PM
I think its Android Debugging script. For that If i remembered properly from #XDA , he must run it as a root user with sudo
Lars Noodén
March 7th, 2014, 12:05 PM
I think its Android Debugging script. For that If i remembered properly from #XDA , he must run it as a root user with sudo
Yes, now I see the error messages.
What are the first few lines of the script?
head -n 8 run.sh
You probably want to take a look through the whole thing really before running it as root, just to be sure.
Impavidus
March 7th, 2014, 12:05 PM
run.sh is running, but it calls adb.sh, which doesn't run. You may have to give execute permission to adb.sh
raja.genupula
March 7th, 2014, 12:08 PM
Yes , its better to have a look before running something
nunecas123
March 7th, 2014, 03:06 PM
Why don't you use sudo?
sudo ./run.sh
scoobyd
March 8th, 2014, 01:09 AM
What filesystem are you using there?
mount | grep /dev
username@Tosh-Ubuntu:~$ mount | grep /dev
/dev/sda8 on / type ext4 (rw,errors=remount-ro)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
/dev/sda7 on /boot type ext4 (rw)
/dev/sda9 on /home type ext4 (rw)
/dev/sda2 on /boot/efi type vfat (rw)
/dev/sda5 on /media/username/Loopie type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,b lksize=4096)
/dev/sdb1 on /media/username/61D3-9E5B type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed ,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
scoobyd
March 8th, 2014, 01:12 AM
Yes, now I see the error messages.
What are the first few lines of the script?
head -n 8 run.sh
You probably want to take a look through the whole thing really before running it as root, just to be sure.
username@Tosh-Ubuntu:~/Desktop/linux$ head -n 8 run.sh
BASE=$(dirname $0)
pkg=$($BASE/adb shell pm path com.koushikdutta.backup)
# apparently pm path appends a carriage return which screws
# up the class name in dalvikvm invocation
pkg=$(echo $pkg | cut -d : -f 2 | sed s/\\r//g)
echo $pkg
$BASE/adb shell << EOF
CLASSPATH=$pkg app_process /system/bin com.koushikdutta.shellproxy.ShellRunner2 $@ &
scoobyd
March 8th, 2014, 01:16 AM
run.sh is running, but it calls adb.sh, which doesn't run. You may have to give execute permission to adb.sh
I gave adb excute permission but now end up with this:
username@Tosh-Ubuntu:~/Desktop/linux$ ./run.sh
./run.sh: line 2: ./adb: No such file or directory
./run.sh: line 7: ./adb: No such file or directory
Impavidus
March 8th, 2014, 12:02 PM
Peculiar... What's in there exactly?
ls -l run.sh adb.sh
scoobyd
March 9th, 2014, 02:16 AM
Peculiar... What's in there exactly?
ls -l run.sh adb.sh
username@Tosh-Ubuntu:~$ ls -l run.sh adb.sh
ls: cannot access run.sh: No such file or directory
ls: cannot access adb.sh: No such file or directory
username@Tosh-Ubuntu:~$ cd Desktop/linux
username@Tosh-Ubuntu:~/Desktop/linux$ ls -l run.sh adb.sh
ls: cannot access adb.sh: No such file or directory
-rwxrwxrwx 1 username username 351 Jan 31 2013 run.sh
I wanted to run Helium: http://www.clockworkmod.com/carbon
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.