From 46ed8bd6d9ccd43fafc65d0036fdc153380c20eb 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 565d3b917..38347def2 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -569,7 +569,6 @@ class FuseOperations(llfuse.Operations, FuseBackend): user=dir_user, group=dir_group, uid=dir_uid, gid=dir_gid) 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: if isinstance(self.repository_uncached, RemoteRepository): daemonize() From e3f7eb7757f06c06bfa603f118160d174c928169 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.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 60c0d0e6d..edccf2d80 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -3283,10 +3283,26 @@ class Archiver: 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``.