Running a .sh script for /sdcard

kevdog

Member
Joined
Nov 14, 2009
Messages
722
Reaction score
0
Ok, maybe I'm behind on the times, but I made a script file:

#!/system/bin/sh
...
...

On the /sdcard. Im rooted. The permissions of the file are the following:
----rwxr-x system sdcard_rw

With Terminal Emulator I tried to run the script:
./script.sh

Put I get permission denied all the time. I cant even chown or chmod this file (777) either. What gives? Does it have to do with the way the /sdcard is mounted and its permissions?
 

MotoCache1

Chief Droid Scientist
Joined
Jun 30, 2010
Messages
530
Reaction score
1
The /sdcard partition is mounted specifically to prevent you from doing that.

Code:
rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

You could remount it just rw, but in my opinion that would be a massive security hole. Why not just put the script in /system?
 
Top