Results 1 to 10 of 10

Thread: can't run shell scripts

  1. #1
    Join Date
    Nov 2008
    Location
    Cairo,Egypt
    Posts
    68

    Angry can't run shell scripts

    everytime i run a shell script (.sh) using "konsole",it says "bad interpreter: permission denied".


    why is this happening?

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: can't run shell scripts

    Show us the output of the command "mount" and also give us the path where your shell script lives.

  3. #3
    Join Date
    Nov 2008
    Location
    Cairo,Egypt
    Posts
    68

    Default Re: can't run shell scripts

    output of "mount" :

    /dev/sda6 on / type ext3 (rw,acl,user_xattr)
    /proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    debugfs on /sys/kernel/debug type debugfs (rw)
    udev on /dev type tmpfs (rw)
    devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
    /dev/sda1 on /media/C type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
    /dev/sda3 on /media/D type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
    /dev/sda5 on /media/MyStuff type ext3 (rw,noexec,nosuid,nodev,acl)
    fusectl on /sys/fs/fuse/connections type fusectl (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    /proc on /var/lib/ntp/proc type proc (ro)
    my shell script is in /dev/sda5

  4. #4
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: can't run shell scripts

    remove the noexec option from the /dev/sda5 line in /etc/fstab

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: can't run shell scripts

    That noexec was probably implied by the option user. Add exec after it to override.

  6. #6
    Join Date
    Nov 2008
    Location
    Cairo,Egypt
    Posts
    68

    Default Re: can't run shell scripts

    there's no "noexec" in the "fstab" file,i searched the document,nothing was found

    and can somebody tell me where exactly should i put "exec"?


    thanks in advance

  7. #7
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: can't run shell scripts

    Quote Originally Posted by mhh91 View Post
    there's no "noexec" in the "fstab" file,i searched the document,nothing was found

    and can somebody tell me where exactly should i put "exec"?


    thanks in advance
    if so, then place exec somewhere in the options list of /dev/sda5... eg

    Code:
    /dev/sda5 /media/MyStuff ext3 rw,exec,acl

  8. #8
    Join Date
    Nov 2008
    Location
    Cairo,Egypt
    Posts
    68

    Default Re: can't run shell scripts

    Quote Originally Posted by microchip8 View Post
    if so, then place exec somewhere in the options list of /dev/sda5... eg

    Code:
    /dev/sda5 /media/MyStuff ext3 rw,exec,acl
    did this,saved the file,and i'm still having the same problem

  9. #9
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: can't run shell scripts

    you have to remount the partition after this

  10. #10
    Join Date
    Nov 2008
    Location
    Cairo,Egypt
    Posts
    68

    Default Re: can't run shell scripts

    thanks a lot


    it worked,finally

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •