I hit again on this strange behaviour of the system. I'm running Debian 6.0.6 and had quite some troubles executing a script directly from CD/DVD. Finally I had to use:
to run it. What is the big deal of having to resort to sh?! What if the script relies on bash features? Really annoying and not much added to security in my opinion
Does anybody know of a good reason for that behaviour?
PS: if you try to run it directly with ./... you get an error that does not suggest any hint to the issue (filesystem mounted noexec):
bash: ./media/cdrom/command: No such file or directory
If you run it as bash /media/cdrom/command you get the same error (I think verification of mount options are verified by bash even for commands passed as parameters on the command line.
Permanent solution is to add exec to the mount options in /etc/fstab such as:
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0