Results 1 to 10 of 10

Thread: can't run shell scripts

  1. #1
    mhh91 NNTP User

    Default can't run shell scripts


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


    why is this happening?


    --
    mhh91
    ------------------------------------------------------------------------
    mhh91's Profile: http://forums.opensuse.org/member.php?userid=15746
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  2. #2
    ken yap NNTP User

    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.


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  3. #3
    mhh91 NNTP User

    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


    --
    mhh91
    ------------------------------------------------------------------------
    mhh91's Profile: http://forums.opensuse.org/member.php?userid=15746
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  4. #4
    microchip8 NNTP User

    Default Re: can't run shell scripts


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


    --
    *'Get h264enc' (http://h264enc.sourceforge.net)* - *'Get xvidenc'
    (http://xvidenc.sourceforge.net)* - *'Get divxenc'
    (http://divxenc.sourceforge.net)*
    ------------------------------------------------------------------------
    microchip8's Profile: http://forums.opensuse.org/member.php?userid=163
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  5. #5
    ken yap NNTP User

    Default Re: can't run shell scripts


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


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  6. #6
    mhh91 NNTP User

    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


    --
    mhh91
    ------------------------------------------------------------------------
    mhh91's Profile: http://forums.opensuse.org/member.php?userid=15746
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  7. #7
    microchip8 NNTP User

    Default Re: can't run shell scripts


    mhh91;1942582 Wrote:
    > 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
    --------------------


    --
    *'Get h264enc' (http://h264enc.sourceforge.net)* - *'Get xvidenc'
    (http://xvidenc.sourceforge.net)* - *'Get divxenc'
    (http://divxenc.sourceforge.net)*
    ------------------------------------------------------------------------
    microchip8's Profile: http://forums.opensuse.org/member.php?userid=163
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  8. #8
    mhh91 NNTP User

    Default Re: can't run shell scripts


    microchip8;1942597 Wrote:
    > 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


    --
    mhh91
    ------------------------------------------------------------------------
    mhh91's Profile: http://forums.opensuse.org/member.php?userid=15746
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  9. #9
    microchip8 NNTP User

    Default Re: can't run shell scripts


    you have to remount the partition after this


    --
    *'Get h264enc' (http://h264enc.sourceforge.net)* - *'Get xvidenc'
    (http://xvidenc.sourceforge.net)* - *'Get divxenc'
    (http://divxenc.sourceforge.net)*
    ------------------------------------------------------------------------
    microchip8's Profile: http://forums.opensuse.org/member.php?userid=163
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


  10. #10
    mhh91 NNTP User

    Default Re: can't run shell scripts


    thanks a lot


    it worked,finally


    --
    mhh91
    ------------------------------------------------------------------------
    mhh91's Profile: http://forums.opensuse.org/member.php?userid=15746
    View this thread: http://forums.opensuse.org/showthread.php?t=407436


Posting Permissions

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