Image files (loop interface) only mounted read-write after creation, otherwise only read-only
Submitted by rugk
The aim here is to create an LUKS-encrypted "container" with GNOME Disks.
- Open Gnome Disks.
- Menu -> "New disk image…"
- Enter what's needed. (save under ~/Documents e.g.)
- Create a new partition on the file. (ext4 with LUKS as Gnome Disks offers it)
- Is is writable. Unmount via GNOME Disks and so one is okay. It remounts with the same options.
- Now unmount via Nautilus by going to the image file -> right click -> open with -> image mounter (or similar).
- And re-mount via Nautilus.
What happens: The image is mounted as read-only in the second run.
What should happen: Mount as read-write again.
- When mounting the image via "Other places" -> "??MB encrypted" (only possible when loopback device is still attached) in Nautilus is is mounted read/write (so this is OK, IMHO), if the device is a new creation. (so the loopback interface is still writable)
- GNOME Disks -> menu -> "Mount image" it also mounts read-only only.
- When you unmount the original one mounted by GNOME Disks at creation, you have no way to remount it writable when only using the GUI, AFAIK. (At least I could not find a way.)
Note that the reason that I can discover in GNOME disks (or, say, the difference between the mountings) is that it says /dev/loop0 (or loop1, etc.) is wrote-protected.
I think I guess what is happening:
- At a new disk creation the loop interface is made writable. Thus remounting at that loop interface works (that's why in Nautilus one way works, but not new mounting via file).
- When later trying to "just mount" an image, it is always read-only, because the loop interface is readonly.
So it does not seem to matter, how (which UI I use) for mounting, but rather than once you created your device file, you'll never get it mounted read-writable. That is bad, IMHO.
Fedora 27 gnome-disk-utility 3.26.2 UDisks 2.7.6 (build against 2.7.3)