You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Push refused at a destination symlink: lines, order and daemon exit code differ from rsync 3.5.2 #8863
When a push is refused because the destination is reached through a symlink the receiver will not follow, oc-rsync prints different lines from rsync 3.5.2, in a different order, and on a daemon it exits with a different code. Nothing is written through the link in any refused case on either implementation.
Push over a remote shell, link owned by another user
All four destination shapes exit 3 on both. Server stderr:
rsync 3.5.2
oc-rsync
line 1
refusing to follow a symlink owned by an untrusted user; ...
oc-rsync error: server error: failed to access destination directory '<path>': Too many levels of symbolic links (os error 40) (code 3) at ... [server=...]
line 2
rsync: [Receiver] change_dir#N "<path>" failed: Too many levels of symbolic links (40)
refusing to follow a symlink owned by an untrusted user; ...
N is 1 for an existing directory (also when the link is an interior component), 2 for a directory the receiver has just created (path printed without a trailing slash), 3 for the parent of a single-file destination.
So oc prints the refusal last instead of first, prints no change_dir#N line, folds the cause into the trailer with its own wording, and tags the trailer [server= where 3.5.2 tags [Receiver=.
Push to a daemon, link leaving the module
Same result over TCP and over a remote-shell daemon, and whoever owns the link.
shape
rsync 3.5.2 (exit 3)
oc-rsync (exit 11)
existing directory, interior component
rsync: [Receiver] change_dir#1 "<path>" (in mod) failed: Too many levels of symbolic links (40) then the code-3 trailer
only error in file IO (code 11) ... [generator=...]
new directory
change_dir#2 "<path>" (in mod) ... then the code-3 trailer
mkdir "<path>" (in mod) failed: Permission denied (13) then the code-11 trailer
single file
change_dir#3 "<path>" (in mod) ... then the code-3 trailer
only the code-11 trailer
rsync 3.5.2 prints no refusing to follow line on the daemon leg. A 3.5.2 client against an oc daemon sees oc's lines and exit 11.
Expected
The lines, their order, the role tag and the exit code equal rsync 3.5.2's on every row above, checked by tests that compare the ordered lines.
Not yet measured: a link that stays inside the module but is owned by another user, a pull, a local copy, and the --insecure-links / insecure links = yes opt-outs.
Daemon, link that stays inside the module (owned by another user or by the module's user, all four shapes): rsync 3.5.2 exits 3 with change_dir#N "<path>" (in mod) failed: Too many levels of symbolic links (40); oc-rsync exits 11 with only the code-11 trailer. In a daemon module 3.5.2 refuses any symlink in the destination path, whoever owns it.
insecure links = yes, --insecure-links on a pull or local copy, and -M--insecure-links on a push: both follow the link and exit 0. No difference.
Pull: exit 3 on both, refusal line first on both; oc prints failed to access destination directory '<path>': ... (os error 40) where 3.5.2 prints [Receiver] change_dir#N .... Only that middle line differs.
Local copy into an existing directory: exit 3 on both; oc prints its trailer first, with the cause folded in and tagged [client=, and the refusal line last.
The local created-directory and single-file layouts are a confinement problem, not a wording one; they are tracked in #8858.
Activity
oferchen commentedon Nov 26, 2026
Further rows measured, same fixture:
change_dir#N "<path>" (in mod) failed: Too many levels of symbolic links (40); oc-rsync exits 11 with only the code-11 trailer. In a daemon module 3.5.2 refuses any symlink in the destination path, whoever owns it.insecure links = yes,--insecure-linkson a pull or local copy, and-M--insecure-linkson a push: both follow the link and exit 0. No difference.failed to access destination directory '<path>': ... (os error 40)where 3.5.2 prints[Receiver] change_dir#N .... Only that middle line differs.[client=, and the refusal line last.The local created-directory and single-file layouts are a confinement problem, not a wording one; they are tracked in #8858.
test: let tests in any crate plant a foreign-owned symlink without ro…
fix: enter a local copy's destination like change_dir does (#8890)
fix: walk a network receiver destination before mkdir (#8899)