I have an rsync to copy over some rpms from one server to another but the issue is that the symlinks are not being created properly on the receiving server.

My rsync options are -avz --force --delete and I have munge symlinks = no set in rsyncd.conf. Not sure what exactly I am missing here.

For example on server-1-rsync-sender I have

test.rpm -> /var/www/html/repo/Package/test.rpm

On Server-2-rsync-receiver rsycn created

test.rpm -> var/www/html/repo/Package/test.rpm

Edit #1 Full rsync command

RSYNC_OPTIONS='-lavz --force --delete'

rsync $RSYNC_OPTIONS * rsync://${RSYNC_USER}@${rpm_server}:/yum >>/var/log/rsync_sync.log 2>&1

When looking at log it shows coping over correct symlink

Edit #2 rsyncd.conf

path = /var/www/html/repo
use chroot = no
max connections = 100
auth users = rpms
hosts allow = ***********
secrets file = ***********
uid = apache
gid = nobody
list = yes
read only = no
munge symlinks = no

I believe its the combination of the munge symlink and chroot as both are turned off. Seems when both are set to no rsync removes the first /

  • This is the same client talking to two different rsyncd servers? Have you turned on verbose output on the server and examined the output?
    – BowlOfRed
    Commented Mar 20, 2019 at 17:33
  • Sorry I edited question to be more clear, Server-1 is the one running the rsync and server-2 is the receiver
    – Tevoni
    Commented Mar 20, 2019 at 17:41
  • Please also include your rsyncd.conf from the server. MAKE SURE you replace any sensitive information. I suspect you've omitted or disabled some settings there. Commented Mar 20, 2019 at 17:57
  • Main question has been edited
    – Tevoni
    Commented Mar 20, 2019 at 17:57
  • When munge symlinks is disabled on a writable module and "use chroot" is off (or the inside-chroot path is not "/"), incoming symlinks will be modified to drop a leading slash and to remove ".." path elements that rsync believes will allow a symlink to escape the module's hierarchy. There are ways to work around this! That is the cause now i just need to find the workaround
    – Tevoni
    Commented Mar 20, 2019 at 18:21

1 Answer 1


Found the solution to this issue. If you remove the munge links option from rsyncd.conf and then change chroot = yes you will have your symlinks migrated without issue.

Though this will open a possible security hole where anything can be symlinked and there is no protections that munge links and chroot were designed to protect. So it would be very environment specific to use this solution

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .