fuse-overlayfs(1)
π¦ fuse-overlayfs(1) π¦
ok bestie, welcome to the General Commands Manual page for fuse-overlayfs β the little tool that stacks whole directory trees on top of each other like it's a fit check. Sit down, hydrate, and let's get into it π
β¨ NAME β¨
fuse-overlayfs β combine directory trees in userspace
π SYNOPSIS π
mounting
fuse-overlayfs [-f] [-d] [-o OPTION[,OPTION2, ...]] mountpoint
unmounting
fusermount -u mountpoint
πΈ DESCRIPTION πΈ
So, what does it actually do? fuse-overlayfs combines (overlays) two or more directory trees into one. Iconic behaviour, no notes. π«Ά
The big deal is that it can be used by unprivileged users inside a user namespace β no root era required, we love that for you. It's built with FUSE and works with Linux 4.18 or newer, so if your kernel is ancient, that's a you problem, not a me problem π
π OPTIONS π
-fβ Run in foreground. It stays put, in your face, main character energy. π-d,--debug,-o debugβ Enable debugging mode. Fair warning: it can be very noisy π it will simply not stop talking.-o lowerdir=low1[:low2...]β A list of directories separated by:. Their content is merged. Stack them like pancakes π₯-o upperdir=upperdirβ A directory merged on top of all thelowerdirs, where all the changes done to the file system will be written. This is where the drama gets recorded. βοΈ-o workdir=workdirβ A directory used internally byfuse-overlays, and ngl it must be on the same file system as theupperdir. No exceptions, no negotiating. π«-o uidmapping=UID:MAPPED-UID:LEN[,UID2:MAPPED-UID2:LEN2]-o gidmapping=GID:MAPPED-GID:LEN[,GID2:MAPPED-GID2:LEN2]β Specify the dynamic UID/GID mapping used by fuse-overlayfs when reading/writing files to the system.-o squash_to_rootβ Make every file and directory owned by the root user (0:0). Everything is root now. Collective ownership era. π-o squash_to_uid=uid-o squash_to_gid=gidβ Make every file and directory owned by the specified uid or gid. Heads up: this has higher precedence oversquash_to_root, so if you set both, this one wins the argument. π₯-o static_nlinkβ Setst_nlinkto the static value1for all directories. This can be useful for higher latency file systems such as NFS, where counting the number of hard links for a directory with many files can be a slow operation. With this option enabled, the number of hard links reported when runningstatfor any directory is1. Basically: skip the counting, we don't have time. β±οΈ-o noaclβ Disable ACL support in the FUSE file system.-o xino=off|auto|onβ Controls howst_inovalues are generated for files returned by fuse-overlayfs. When all lower and upper layers reside on the same underlying device, fuse-overlayfs exposes the real inode number from the underlying filesystem. When layers span multiple devices, an opaque inode number is generated; by default this value is not stable across mounts. π΅βπ«
The xino option modifies this behavior:
xino=offβ Disables extended inode generation. This matches the default behavior: when all layers are on the same device, the underlying inode number is used; otherwise an opaque, non-stable inode number is returned.xino=autoβ Attempts to generate stable inode numbers across mounts by hashing the file handle returned byname_to_handle_at(2). This mode is used only if all layers supportname_to_handle_at(2); if any layer does not, behavior falls back toxino=off. If all layers are on the same device, the underlying inode number is still used, regardless of this setting. She tries her best, but she also knows when to give up. π§xino=onβ Requires that all layers supportname_to_handle_at(2). If they do, inode numbers are derived from a hash of the file handle and remain stable across mounts. If any layer does not supportname_to_handle_at(2), the mount fails. As with other modes, when all layers are on the same device, the underlying inode number always takes precedence. All or nothing, periodt. π₯
-o ino32_tβ Forces all returnedst_inovalues to be truncated to 32 bits. This option exists solely for compatibility with older 32-bit userspaces that cannot correctly handle 64-bit inode numbers. It has no functional benefit on modern systems and should not be used unless required for legacy compatibility. Like, it's giving legacy-support-only, bestie. π-h,--helpβ Show additional options, provided by FUSE.-V,--versionβ Show versions of fuse-overlayfs and FUSE.
π§ DYNAMIC UID AND GID MAPPING π§
The fuse-overlayfs dynamic mapping is an alternative and cheaper way to chown'ing the files on the host to accommodate the user namespace settings. Cheaper = better, obviously. β¨
It is useful to share the same storage among different user namespaces and counter effect the mapping done by the user namespace itself, and without requiring to chown the files. No messy permission makeovers required. π
Take, for example, two files with the following user and group IDs:
$ stat -c %u:%g lower/a lower/b
0:0
1:1
Also take note of the following user namespace configuration:
$ cat /proc/self/uid_map
0 1000 1
1 110000 65536
After mounting with fuse-overlayfs, the ownership would change:
$ stat -c %u:%g merged/a merged/b
65534:65534
65534:65534
65534 is the overflow ID used when the UID/GID is not known inside the user namespace. This happens because neither user IDs 0 nor 1 are mapped. So they just... don't exist in there. Gone. Unknown. mystery IDs. π»
To map them, we'd mount the fuse-overlayfs file system using the following namespace configuration:
-o uidmapping=0:1000:1:1:110000:65536,gidmapping=0:1000:1:1:110000:65536
The result would then be the following:
$ stat -c %u:%g merged/a merged/b
0:0
1:1
Those are the same IDs visible from outside the user namespace. Slay, mapping worked, we ate. π
π SEE ALSO π
fuse(8), mount(8), user_namespaces(7)
π AVAILABILITY π
The fuse-overlayfs command is available from https://github.com/containers/fuse-overlayfs under GNU GENERAL PUBLIC LICENSE Version 3 or later.
And that's the whole page, bestie π«Ά this was the User Commands section of the fuse-overlayfs(1) manual β go forth, mount responsibly, and remember: no cap, everything you just read is the actual spec. π
π¦ where this page comes from
- arch rolling: fuse-overlayfs 1.18-1 Β· GPL-2.0-only
- centos-stream 10: fuse-overlayfs 1.17-1.el10 Β· GPLv3+
- centos-stream 9: fuse-overlayfs 1.17-1.el9 Β· GPLv3+
- fedora 44: fuse-overlayfs 1.17-1.fc44 Β· GPL-3.0-or-later
- nixpkgs unstable: fuse-overlayfs 1.18
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms