I've created a Perl script and burned it to a CD-ROM disc. I would like to be able to run the script from the CD without having to copy it to some directory on the hard drive. For some reason when it's burned to the CD it loses its permissions; particularly the execute permission.


I think I can just enter "perl myscript.pl" but is it possible to burn the disc so that all I do is simply enter "./myscript.pl"?

  • Which Linux distribution (and version) are you running? – Steven Apr 4 '17 at 20:03
  • If you want permissions to stay, you need to use the Rock Ridge extensions. – Daniel B Apr 4 '17 at 20:47

The iso9660 filesystem does not have an execute bit, so you must execute the file in a different way.

Option 1: Run from Perl

As you mentioned, you can run perl ./myscript.sh.

Option 2: Remount DVD as executable

sudo mount -o remount,exec /media/username/DVDNAME

Option 3: Set default mount options for disc drive

TBD: Differs by Linux distribution and version.

Option 4: Use Rock Ridge Extensions

The Rock Ridge Interchange Protocol (RRIP, IEEE P1282) is an extension to the ISO 9660 volume format, commonly used on CD-ROM and DVD media, which adds POSIX file system semantics ... [including] UNIX-style file modes, user ids and group ids, and file timestamps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.