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.

up vote 15 down vote accepted

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.

  • What makes the format so difficult to modify? – Ciro Santilli 新疆改造中心 六四事件 法轮功 May 22 '15 at 9:12
  • @CiroSantilli巴拿馬文件六四事件法轮功 It is the format used on CD ROMs. "ROM" = "Read Only Memory" – Kusalananda Aug 5 '16 at 6:41
  • @Kusalananda sure, I understand that. But I was looking for more precise details of what makes the format hard to modify (forgetting physical media, since we are on a hard disk). – Ciro Santilli 新疆改造中心 六四事件 法轮功 Aug 5 '16 at 7:04
  • If you modify a file so that it now takes up more 2048-byte blocks than it initially did, a ISO 9660 Level 1 or 2 filesystem cannot place the addition into a different location, but the whole file must be relocated, creating a "hole" of unused space where the file used to be. And it looks like the filesystem has no provisions of keeping track of the locations of such holes, making finding free space anywhere but at the very end of the filesystem extremely inefficient. So a read/write ISO9660 filesystem would quickly bloat in size as modifications are made. – telcoM May 31 at 12:34
  • This was the reason why writeable CD-R and CD-RW discs initially had to be written with a specific CD-ROM authoring program, and the actual write operations had to be done as "sessions". Later, the UDF filesystem was developed to allow more disk-like write access ("packet writing") on CD-RWs. – telcoM May 31 at 12:49

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.

Disable RockRidge while creating ISO. Now it will be generated with all rights.

  • How would disabling RockRidge extensions help? – jasonwryan Aug 5 '16 at 5:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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