Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On an Ubuntu 9.10 (Karmic Koala) machine, I burned a CD from the command prompt using:

cdrecord -v speed=16 dev=0,1,0 /FPS.iso

The CD now contains an executable and some files. I tested the CD by loading it onto another machine (Red Hat 5.3) and when I try to run the program I get the following message:

bash: ./FPS1_1: Permission denied

I can open other files like text documents (the executable also comes with shared libraries). I realized I had burned the CD as root so I burned another one as another user but I still have the same problem. How can I remove this permission or what is the problem?

P.S. the image was in / if that helps.

The command I used to generate the image is:

mkisofs -frvJL -o /buffer/mycd.iso /temp/mydirectory/

The -r stands for "Generate rationalized Rock Ridge directory information". Should I use -R ("Generate Rock Ridge directory information")?

share|improve this question
add comment

migrated from stackoverflow.com Mar 23 '10 at 23:04

This question came from our site for professional and enthusiast programmers.

2 Answers

The problem is not how you burned the disc but in how you created the image. If you do not enable Rock Ridge extensions when generating the ISO then it will use whatever options are specified during the mount operation instead of the permissions it originally had.

share|improve this answer
    
i did enable them actually, well I added r not R –  user16654 Mar 23 '10 at 23:47
add comment

As Ignacio's answer indicates, this has more to do with generating the ISO and mounting the filesystem than with burning the ISO to disc.


You can mount the CDR or ISO with the umask option to make sure files have the executable bit in the mounted filesystem. For example, umask=022 would give all files permissions of 755, also known as rwxr-xr-x.

mount -t iso9660 -o umask=022 /dev/cdrom /path/to/mount/point

This will fix the permissions issue once; for a permanent fix, add the umask option to your system mounting systems (/etc/fstab, or any automounters in use), or fix the ISO image.


On Ubuntu, mkisofs is a symlink to genisoimage. According to the genisoimage manpage, the -R may be closer to what you want than -r (emphasis mine):

-R   Generate SUSP and RR records using the Rock Ridge protocol to further describe the files on the ISO9660 filesystem.

-r   This is like the -R option, but file ownership and modes are set to more useful values. The uid and gid are set to zero, because they are usually only useful on the author's system, and not useful to the client. All the file read bits are set true, so that files and directories are globally readable on the client. If any execute bit is set for a file, set all of the execute bits, so that executables are globally executable on the client. If any search bit is set for a directory, set all of the search bits, so that directories are globally searchable on the client. All write bits are cleared, because the filesystem will be mounted read-only in any case. If any of the special mode bits are set, clear them, because file locks are not useful on a read-only filesystem, and set-id bits are not desirable for uid 0 or gid 0.

share|improve this answer
    
thx for the precision, I am going to try it later on –  user16654 Mar 24 '10 at 2:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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