Running a .sh script for /sdcard

Discussion in 'Android Hacks and Help' started by kevdog, Aug 14, 2010.

  1. kevdog

    kevdog Member

    Joined:
    Nov 14, 2009
    Messages:
    722
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +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?
     
  2. MotoCache1

    MotoCache1 Chief Droid Scientist

    Joined:
    Jun 30, 2010
    Messages:
    530
    Likes Received:
    1
    Trophy Points:
    18
    Ratings:
    +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?
     
Search tags for this page
android .sh
,
android script permission denied
,
android script run
,
android sh permission denied
,
how to run .sh file on android
,
how to run a script on android
,
how to run scripts on android
,
how to run sh in android
,
how to run sh on android
,

run sh file android