Yup, that was the problem. My /etc/fstab didn't specify to mount it 'noexec' but I guesse that's what happens when you leave out 'defaults' from the line. Problem solved. Thanks all for the help.
> > Run the `mount' command and check if the disk the script is running on > is mounted with the `noexec' option (might be useful for vfat > partitions and the like). Also check if the directory you are going to > write to is mounted rw (not ro), and if that directory is writable. > > HTH, > Eric > > -- > E.L. Meijer ([EMAIL PROTECTED]) | tel. office +31 40 2472189 > Eindhoven Univ. of Technology | tel. lab. +31 40 2475032 > Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax +31 40 2455054