Re: Running shell scripts from external media

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





James B. Byrne wrote:
OS=CentOS-5.2
media=Kingston 512Mb usb key

Problem:
As 'root', when running a script resident on the external drive mounted at
/media/disk I receive the following error:

/bin/sh: bad interpreter: Permission denied

<snip>
I deduce from the various bits of information that I have gleaned thatthe
proper entry in fstab should be something like:

/dev/sda1 /disk auto defaults,user,exec 0 0

However, this is an automounted, removable media.  How do I do enable
execute for this key and retain the auto mount capability?  What impact
will this have on other usb keys?

I think you have the right diagnostic, the key is mounted with the noexec flag.
You can confirm this by typing "mount" when the usb key is mounted.

But I don't know the answers to your questions...

However if it fits your usefase you could invoke the shell yourself:
/bin/sh hello.sh

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux