AppImage mounted filesystem read-only errors when executing mv/modify commands
Hi, when running the script from within an AppImage, it attempts to modify files in the mounted filesystem at /tmp/.mount_*. However, this filesystem is mounted as read-only by design, causing various commands (particularly mv and file modification operatios) to fail with "Read-only file system" errors.
For example, when executing the script, I encounter errors like:
mv: cannot remove '/tmp/.mount_pkg2apnThTDz/pkg2appimage.desktop': Read-only file system
This occurs because the HERE variable points to the AppImage's mounted location (e.g., /tmp/.mount_pkg2apEi0qUV/), and the script attempts to perform write operations in this read-only environment.
How can I handle this read-only filesystem scenario and ensure file operations work correctly when running from an AppImage?
Hi, your description is correct. You should not try writing or moving files inside a mounted AppImage, as it is read-only by design.
What do you want do achieve?
If you want to modify what is inside the AppImage, you need to extract it, make the changes, and repack it as an AppImage.
Thanks for your answer! I've been working on building a KiCad AppImage and made some modifications to the script. Specifically, I replaced the mv command with cp to work within a read-only file system. When I tried to execute the script directly, without repacking the AppImage, I encountered an error stating command not found: generate_status. I know that the generate_status function is defined in functions.sh, but it wasn't called when I executed the AppImage script directly. Could you please advise me on how to properly repack the AppImage?