View Full Version : Running cd script files that are not executable

11th May 2006, 04:45 PM
Is there a convenient way to run a script file that is on a cd when its permissions, as seen by Linux, show it is not executable? Or must I always copy the script to my hard drive?

13th May 2006, 01:19 PM
is this a valid way?
[david@lima bash2]$ chmod 400 noperm
[david@lima bash2]$ ls -l
total 4
-r-------- 1 david david 8 May 13 13:17 noperm
[david@lima bash2]$ cat noperm
time ls
[david@lima bash2]$ sh noperm

real 0m0.004s
user 0m0.000s
sys 0m0.004s
[david@lima bash2]$

13th May 2006, 01:36 PM
you could also edit /etc/auto.misc , edit the line cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom to
cd -fstype=iso9660,ro,nosuid,execnodev :/dev/cdrom . the exec option allows you to execute file from cd. you need not copy files to the hard disk.