Making directories non-executable?
There is an option when mounting partitions: noexec .
It is advisable to have a separate partition for /tmp (if this is the directory you're trying to make it a "non executable medium") and mount it with noexec (and nosuid) option(s).
George Iosif