I frequently use mksquashfs to make backups of folders on various systems. Sometimes this results in files which cannot be read by any users upon mounting. If I do a
sudo mount file.squashfs /to/mountpoint
and then try to ls the directory as root or with sudo I get a "permission denied" error. Viewing the properties of the mountpoint in Thunar results in it showing the owner as nobody
. Applying a chmod
also doesn't work as squashfs is a read-only filesystem.
How can I force mount to mount squashfs in a permissions-agnostic way or with the correct permissions? I don't actually need permissions for this use case, it may as well be world-readable.
Edit: I never found a full solution for opening "unreadable by root due to permissions" squashfs files, but I did find a way to prevent it from happening again. This works cross-system and cross-platform. Adding -all-root makes all files in the archive owned by root. Since permissions aren't important for these backups it is a clunky but effective fix. Still curious to see if somebody has a better one.
Asked by Mr. T
(109 rep)
Apr 27, 2019, 05:39 AM
Last activity: Feb 8, 2024, 08:04 AM
Last activity: Feb 8, 2024, 08:04 AM