Skip to content

Receiver setup does not refuse a bad --backup-dir or an unsearchable destination root #8881

Done

Description

@oferchen

Two receiver setup checks that rsync 3.5.2 runs before any transfer are missing in oc. In both cases oc fails later than 3.5.2, with a different exit code, or does not fail at all.

--backup-dir that is not a usable directory

3.5.2 checks the backup dir in do_recv() (main.c:1036-1057), resolved against the destination:

  • not a directory: The backup-dir is not a directory: %s, exit 1;
  • any stat failure except ENOENT (for example a path below a regular file): Failed to stat %s: %s, exit 11.

oc never checked it. It failed at the first backup instead: exit 23 locally, or a keep_backup failed line on a remote receiver. When no file needed a backup, nothing was refused at all.

Destination root without search permission (mode 000)

3.5.2 prints change_dir#1 "<dest>/" failed: Permission denied (13) and exits 3, dry run included (main.c:776-781).

leg oc 3.5.2
local exit 3 exit 3
pull, push exit 23 exit 3
dry-run pull exit 0 exit 3

Not reproduced

Two cases from the original note do not reproduce: --checksum-choice=xxh128 --protocol=29 and --compress-choice=lz4 --protocol=30. rsync 3.5.2 has no protocol gate for either (checksum.c:192-226, compat.c:183-221). The exit 4 only appears on builds compiled without xxhash or lz4, which print unknown checksum name / unknown compress name.

Activity

  1. added this to the v0.6.5 milestone on Nov 27, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions