mirror of
https://github.com/borgbackup/borg.git
synced 2026-07-15 21:12:50 -04:00
Merge pull request #9862 from PhrozenByte/drop-symlink-mount-warning-master
Drop borgfs runtime warning about symlinks and improve corresponding docs [master]
This commit is contained in:
commit
10df5a898b
2 changed files with 20 additions and 9 deletions
|
|
@ -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 <repo path> <mountpoint>
|
||||
mount -o remount,nosymfollow <repo path> <mountpoint>
|
||||
|
||||
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``.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue