I have an ISO file and I mount it under /mnt/isofile. Then I copied this file to another folder. But the contents are read-only and belonged to root. I tried to use chmod and chown. But it prompts with the message:
it is read only file system.
What is going on here?
NOTE: There is a tar file in the .iso, I want to compress it, but failed with the same “read only file system” message.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
ISO 9660 is by design a read-only file system. This means that all the data has to be written in one go to the medium. Once written, there is no provision for altering the stored content. Therefore ISO 9660 is not suitable to be used on random-writable media, such as hard disks.
You need to copy whole directory tree to another directory, make your changes and then burn a new image.
Method 2
If you happen to run an OS supporting it (Linux & BSDs), you might use Unionfs to somewhat mount an ISO in read-write mode. All writes will be actually be done on a read-write file system but depending on your needs, that might fit them.
Method 3
Disable RockRidge while creating ISO. Now it will be generated with all rights.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0