From a56eb9e1db492f8495a5030442313511d9a54465 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sat, 4 Jul 2026 16:01:24 +0200 Subject: [PATCH 1/2] Drop non-actionable borgfs warning about symlinks --- src/borg/fuse.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index e92da2ffb..2f7eb9836 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -590,11 +590,6 @@ class FuseOperations(llfuse.Operations, FuseBackend): ) self._create_filesystem() llfuse.init(self, mountpoint, options) - logger.warning( - "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. " - "When following such symlinks you may see files and directories within the mountpoint " - "that do not reflect the archive content." - ) if not foreground: with daemonizing(show_rc=show_rc) as (old_id, new_id): # the locking process' PID is changing, migrate it: From 88e186e0533cb95459a30e26d8f65d37fea426b4 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sat, 4 Jul 2026 16:15:32 +0200 Subject: [PATCH 2/2] Improve docs note about symlink behaviour --- src/borg/archiver/mount_cmds.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/borg/archiver/mount_cmds.py b/src/borg/archiver/mount_cmds.py index c748a0770..de7e054c2 100644 --- a/src/borg/archiver/mount_cmds.py +++ b/src/borg/archiver/mount_cmds.py @@ -77,10 +77,26 @@ class MountMixIn: archives and the directory structure below these will be loaded on-demand from the repository when entering these directories, so expect some delay. - Care should be taken, as Borg backs up symlinks as-is. When an archive - or repository is mounted, it is possible to “jump” outside the mount point - by following a symlink. If this happens, files or directories (or versions of them) - that are not part of the archive or repository may appear to be within the mount point. + .. note:: + + Borg stores symbolic links as-is. Consequently, when an archive or + repository is mounted, symbolic links may resolve to locations outside of + the mountpoint, either because they are absolute or because relative links + traverse outside of the mounted tree. + + Normal UNIX pathname resolution applies: most tools follow symbolic links + by default and may therefore access files or directories that are not part + of the mounted archive. Consequently, operations intended to inspect + archived data may instead access "live" data from the host filesystem. + + On Linux, this can be prevented by remounting the mountpoint with the + ``nosymfollow`` VFS mount option, for example: + + borg mount + mount -o remount,nosymfollow + + Alternatively, access the mounted archive from an appropriately isolated + environment (for example, a container or ``chroot``). Unless the ``--foreground`` option is given, the command will run in the background until the filesystem is ``unmounted``.