diff --git a/mkdocs/docs/faq/compatibility_and_integration.md b/mkdocs/docs/faq/compatibility_and_integration.md index 1b82d9b4..522f44ac 100644 --- a/mkdocs/docs/faq/compatibility_and_integration.md +++ b/mkdocs/docs/faq/compatibility_and_integration.md @@ -155,16 +155,14 @@ FUSE filesystems, including mergerfs, do not support per-inode SELinux labels (see [Red Hat bug 1272868](https://bugzilla.redhat.com/show_bug.cgi?id=1272868) and the [upstream fuse-devel -thread](https://sourceforge.net/p/fuse/mailman/fuse-devel/thread/CAN9vWDLGA4%3Dg3peKVWkX7gLRiVUUvJAQx9kiXHgqdeX6eh0MYA%40mail.gmail.com/)). -When a container runtime such as Podman or Docker is asked to relabel -a bind mount with the `:z` or `:Z` mount option, it first probes the -source for `security.selinux` xattr support. On a FUSE path that -probe returns `EOPNOTSUPP` and the runtime skips relabeling entirely. -Files inside the mount keep the `fusefs_t` type assigned by the -kernel. No tree walk is performed and no journal noise is produced at -default verbosity. The runtime logs `Labeling not supported on -""` only at debug level (for example -`podman --log-level=debug`). The flag is therefore a no-op against a +thread](https://sourceforge.net/p/fuse/mailman/fuse-devel/thread/CAN9vWDLGA4%3Dg3peKVWkX7gLRiVUUvJAQx9kiXHgqdeX6eh0MYA%40mail.gmail.com/)), +so `:z` / `:Z` relabeling cannot apply to them. When a container +runtime such as Podman or Docker is asked to relabel a bind mount +with the `:z` or `:Z` mount option, it detects that the mount does +not support labeling and skips relabeling. Files inside the mount +keep the `fusefs_t` type assigned by the kernel. At debug verbosity +the runtime reports that labeling is not supported, with the exact +wording varying by version. The flag is therefore a no-op against a mergerfs mount; not harmful, but misleading. Containers can still read and write a mergerfs pool without `:z` @@ -173,8 +171,10 @@ satisfied without any relabel: * **SELinux:** on Fedora, RHEL / CentOS Stream, and SUSE the shipped [container-selinux](https://github.com/containers/container-selinux) - policy already permits the `container_t` process type to manage - files of type `fusefs_t`. See `container_selinux(8)`. + policy permits the `container_t` process type to manage files of + type `fusefs_t` on current releases of those distributions. Check + yours with `sesearch -A -s container_t -t fusefs_t -c file`. See + `container_selinux(8)`. * **DAC:** the in-container UID and GID must still be able to read and write the files on the underlying branches. With rootless Podman this is most easily arranged by aligning the container UID @@ -200,17 +200,8 @@ host-side processes touching the mount (rsync, backup tools, web UIs, cron jobs) see `container_file_t` rather than `fusefs_t` and may require a small SELinux policy adjustment. -To verify on your own system: - -``` -podman --log-level=debug run --rm \ - -v /path/to/mergerfs:/data:z \ - alpine true 2>&1 | grep -iE 'relabel|setfilecon|Labeling' -``` - -Expected output is a single line of the form -`Labeling not supported on "/path/to/mergerfs"` and nothing in -`ausearch -m AVC,SELINUX_ERR` for the mount. +To check for SELinux denials involving the mount, use +`ausearch -m AVC,SELINUX_ERR`. ## Can mergerfs be used with NFS root squash? diff --git a/mkdocs/docs/faq/downsides.md b/mkdocs/docs/faq/downsides.md index 8233d52f..eccdd6c7 100644 --- a/mkdocs/docs/faq/downsides.md +++ b/mkdocs/docs/faq/downsides.md @@ -199,13 +199,12 @@ for example, `path-hash` stabilizes identity by path for NFS, but prevents applications from recognizing hard links by inode equality. The hard links themselves still work. -On SELinux systems, per-file relabeling is unavailable through the -FUSE mount, so container bind-mount options `:z` and `:Z` do not -perform their usual relabeling. This does not mean containers cannot -use the pool: an appropriate SELinux policy or a mount-wide context -can allow access. A mount-wide context is not a substitute for -distinct per-file labels if the application requires them. See [Does -mergerfs work with SELinux +Container bind-mount options `:z` and `:Z` cannot perform their usual +per-file relabeling on the pool. Omit them on mergerfs bind mounts and +allow container access with an appropriate SELinux policy or a +mount-wide context instead; a mount-wide context is not a substitute +for distinct per-file labels if the application requires them. See +[Does mergerfs work with SELinux relabeling?](compatibility_and_integration.md#does-mergerfs-work-with-selinux-relabeling). See [Technical Behavior and