Skip to content

rsync 3.5.0 regression on FreeBSD: non-root receiver gets EACCES on change_dir#1 #1080

Description

@freegateway

Summary

After upgrading from rsync 3.4.4 to 3.5.0 on a FreeBSD system, rsync pushes over SSH fail when the remote receiver runs as a non-root user:

rsync: [Receiver] change_dir#1 "/var/www/site/public_html/test/" failed: Permission denied (13)

rsync successfully creates the destination directory, but then fails when attempting to enter it.

Downgrading to rsync 3.4.4 fixes the problem with no other changes.

I've reproduced the problem on two separate FreeBSD 15.1-STABLE systems, one a jail and one a normal host.

Systems

Server 1 (FreeBSD jail):

FreeBSD 15.1-STABLE #0 stable/15-bd0449aab239-dirty:
Sat Aug 29 14:07:37 UTC 2026
rsync 3.5.0, protocol version 32

Server 2 (FreeBSD host, not a jail):

FreeBSD 15.1-STABLE #0 stable/15-3701716fdc45-dirty:
Tue Jul 28 02:04:42 UTC 2026
rsync 3.5.0, protocol version 32

Both hosts use custom FreeBSD kernels.

Tests

On Server 1 the receiver runs as:

uid=2000(webmaster) gid=80(www) groups=80(www)

The destination directory created by rsync is owned by webmaster:www and has mode 0755. Its NFSv4 ACL grants the owner read/write/execute access.

All destination path components from /var/www/site downward are owned by webmaster, and none are symbolic links.

I performed the following tests:

rsync 3.4.4, non-root receiver                       WORKS
rsync 3.5.0, non-root receiver                       FAILS: EACCES at change_dir#1
rsync 3.5.0, FreeBSD-specific FLAGS patch disabled   FAILS: same error
rsync 3.5.0, receiver running as root                WORKS
rsync 3.5.0, non-root receiver in jail               FAILS
rsync 3.5.0, non-root receiver, no jail              FAILS

As the non-root user, both interactive and non-interactive SSH commands can cd into the destination and create files/directories there without error.

Thus:

  • the filesystem permissions allow the operation;
  • the problem is not specific to FreeBSD jails;
  • the problem persists with the FreeBSD-specific FLAGS patch disabled;
  • changing only rsync from 3.5.0 to 3.4.4 fixes it;
  • running the 3.5.0 receiver as root also avoids it.

Example command

The failing rsync push command is approximately:

rsync \
    --verbose \
    --itemize-changes \
    --human-readable \
    --archive \
    --hard-links \
    --acls \
    --xattrs \
    --new-compress \
    --delete \
    --partial \
    --numeric-ids \
    -e /usr/local/bin/ssh \
    -i /home/user/.ssh/id_webmaster@www.example.com \
    /tmp/test/ \
    webmaster@www.example.com:/var/www/site/public_html/test/

Both sender and receiver are rsync 3.5.0.

Conclusion

This appears to be an upstream rsync 3.5.0 regression affecting non-root receivers on FreeBSD.

Given the change_dir#1 failure and the fact that 3.4.4 works, the new destination-path resolution/security code introduced in 3.5.0 may be relevant, but I have not established that as the cause.

I cannot currently provide a ktrace because I intentionally built the primary server's custom kernel without options KTRACE.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions