bash: line 1: /usr/local/sbin/rrsync: No such file or directory

Today I got this message in the logs:

bash: line 1: /usr/local/sbin/rrsync: No such file or directory
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(232) [Receiver=3.4.1]

The rest of the message told me it was a cronjob run by the rsyncer user on my x8dtu host.

Looking at that cronjob I found:

[rsyncer@x8dtu ~]$ crontab -l
# use /bin/sh to run commands, overriding the default set by cron
SHELL=/bin/sh
# mail any output to `dan', no matter whose crontab this is
MAILTO=dan@langille.org

# take a local copy of the bacula stuff

26     *        *       *       *       /usr/bin/lockf -t 0 /tmp/.rsync.bacula.config.lock   ${HOME}/bin/rsync-bacula-config.files.sh >> /var/log/rsync-bacula-config.files.log
22     2/3      *       *       *       /usr/bin/lockf -t 0 /tmp/.rsync.bacula.database.lock ${HOME}/bin/rsync-bacula-database.sh     >> /var/log/rsync-bacula-database.log

2      2       *       *       *       ~/bin/backup.sh > ${HOME}/logs/backup.log

It was the ${HOME}/bin/rsync-bacula-config.files.sh script which generated the message.

[rsyncer@x8dtu ~]$ cat ${HOME}/bin/rsync-bacula-config.files.sh
#!/bin/sh
/usr/local/bin/rsync -e "ssh -i ${HOME}/.ssh/id_ed25519" --dirs -avx --stats --progress \
 bacula.int.unixathome.org:/etc/bacula/*.conf     \
 bacula.int.unixathome.org:/bacula/bsr            \
 ${HOME}/backups/Bacula/

A bit of playing around led me to look at the bacula.int.unixathome.org host.

I knew to check the authorized keys file, because I know how this setup works.

[rsyncer@bacula ~]$ cat ~/.ssh/authorized_keys | grep x8dtu
from="x8dtu.startpoint.vpn.unixathome.org,10.8.1.100",command="/usr/local/sbin/rrsync -ro /usr/local/" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIERpb6rCHZ+zK5Q3LvJFukdFzT+Q92GUtej6SLW8 rsyncer@x8dtu.unixathome.org

OK, from there, I made sure the directories existed, relative to the -ro /usr/local/ directive – yes, both /etc/bacula/*.conf and /bacula/bsr existed.

So what about /usr/local/sbin/rrsync?

Nope. It did not exist. WTF? It exists on this host:

[rsyncer@x8dtu ~]$ pkg which /usr/local/sbin/rrsync
/usr/local/sbin/rrsync was installed by package rsync-3.4.1_4

What’s on the failing host:

[rsyncer@bacula ~]$ pkg info -x rsync
rsync-3.4.1_5

Checking FreshPorts

At I found:

These upgrade notes are taken from /usr/ports/UPDATING

2025-12-28

Affects: users of net/rsync
Author: rodrigo@FreeBSD.org
Reason: 
  Add a new option PYTHON that controls when the Python script
  sbin/rrsync is installed and adds the necessary dependencies.
  By default this option is off; updating the package will remove
  the rrsync script.

Ahh, looking at the commit .history, I found this commit. This is the PR.

Fixing my build

I added this to my poudriere‘s /usr/local/etc/poudriere.d/make.conf file: net_rsync_SET+=PYTHON.

I rebuilt the package and run pkg upgrade. In came the changes and my rsync started working again.

Ports?

If you’re using FreeBSD packages, I’m afraid you’ll have to build your own packages. I think this change breaks POLA. All the FreeBSD package users now have broken installs.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top