Jump to content

rsync Script stopped working after updating to 6.8


Recommended Posts

Hi everyone,

 

I was wondering if anyone has encountered issues with startup scripts since update 6.8?

 

I use a startup script to unable rsync as I use it for backups to my Unraid server.

 

I have a rsyncd.conf file under /etc/rsyncd.conf I also have a copy of it under /boot/custom/etc/rsyncd.conf

uid             = root
gid             = root
use chroot      = no
max connections = 4
pid file        = /var/run/rsyncd.pid
timeout         = 600

[backups]
    path = /mnt/user/backup
    comment = Backups
    read only = FALSE

[boot]
    path = /boot
    comment = /boot files
    read only = FALSE

[mnt]
    path = /mnt
    comment = /mnt files
    read only = FALSE

I then have a S20-init.rsyncd file under /boot/custom/etc/rc.d/ (full path /boot/custom/etc/rc.d/S20-init.rsyncd)

#!/bin/bash

if ! grep ^rsync /etc/inetd.conf > /dev/null ; then
cat <<-EOF >> /etc/inetd.conf
rsync   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon
EOF
read PID < /var/run/inetd.pid
kill -1 ${PID}
fi

cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf

I then run this via boot/config/go

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
# call S20-init.rsyncd from your /boot/config/go
/boot/custom/etc/rc.d/S20-init.rsyncd

Everything is working fine under 6.6.7, but from 6.8 this stops working.

 

If anyone has any idea that can help it will be much appreciated.

 

Thank you!

Link to comment
19 minutes ago, Zero Day Virus said:

Hi everyone,

 

I was wondering if anyone has encountered issues with startup scripts since update 6.8?

 

I use a startup script to unable rsync as I use it for backups to my Unraid server.

 

I have a rsyncd.conf file under /etc/rsyncd.conf I also have a copy of it under /boot/custom/etc/rsyncd.conf


uid             = root
gid             = root
use chroot      = no
max connections = 4
pid file        = /var/run/rsyncd.pid
timeout         = 600

[backups]
    path = /mnt/user/backup
    comment = Backups
    read only = FALSE

[boot]
    path = /boot
    comment = /boot files
    read only = FALSE

[mnt]
    path = /mnt
    comment = /mnt files
    read only = FALSE

I then have a S20-init.rsyncd file under /boot/custom/etc/rc.d/ (full path /boot/custom/etc/rc.d/S20-init.rsyncd)


#!/bin/bash

if ! grep ^rsync /etc/inetd.conf > /dev/null ; then
cat <<-EOF >> /etc/inetd.conf
rsync   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon
EOF
read PID < /var/run/inetd.pid
kill -1 ${PID}
fi

cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf

I then run this via boot/config/go


#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
# call S20-init.rsyncd from your /boot/config/go
/boot/custom/etc/rc.d/S20-init.rsyncd

Everything is working fine under 6.6.7, but from 6.8 this stops working.

 

If anyone has any idea that can help it will be much appreciated.

 

Thank you!

It is mentioned in the 6.8 release notes that the security of the flash drive has been tightened and files located there can no longer have execute permission.

 

Option now available are:

  • Add the command before the script name.  E.g.   bash scriptname
  • copy the script elsewhere and then give them execute permissions
  • use the User Scripts plugin to run the script.
  • Like 1
Link to comment
  • 2 weeks later...
On 12/30/2019 at 4:10 PM, Zero Day Virus said:

Cheers Guys, I missed going over the release notes (my bad). I'll test out your suggestion @johnnie.black

I really wish that when you select the option to upgrade that the Release Notes would be popped up so that you had to at least acknowledge that you had seen them.   I know that you can already read them by clicking on the appropriate icon but I would prefer a more pro-active approach as then more people would end up reading them.

 

Link to comment
  • 1 year later...
On 12/28/2019 at 12:41 AM, Zero Day Virus said:

Hi everyone,

 

I was wondering if anyone has encountered issues with startup scripts since update 6.8?

 

I use a startup script to unable rsync as I use it for backups to my Unraid server.

 

I have a rsyncd.conf file under /etc/rsyncd.conf I also have a copy of it under /boot/custom/etc/rsyncd.conf




uid             = root
gid             = root
use chroot      = no
max connections = 4
pid file        = /var/run/rsyncd.pid
timeout         = 600

[backups]
    path = /mnt/user/backup
    comment = Backups
    read only = FALSE

[boot]
    path = /boot
    comment = /boot files
    read only = FALSE

[mnt]
    path = /mnt
    comment = /mnt files
    read only = FALSE

I then have a S20-init.rsyncd file under /boot/custom/etc/rc.d/ (full path /boot/custom/etc/rc.d/S20-init.rsyncd)




#!/bin/bash

if ! grep ^rsync /etc/inetd.conf > /dev/null ; then
cat <<-EOF >> /etc/inetd.conf
rsync   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon
EOF
read PID < /var/run/inetd.pid
kill -1 ${PID}
fi

cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf

I then run this via boot/config/go




#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
# call S20-init.rsyncd from your /boot/config/go
/boot/custom/etc/rc.d/S20-init.rsyncd

Everything is working fine under 6.6.7, but from 6.8 this stops working.

 

If anyone has any idea that can help it will be much appreciated.

 

Thank you!

 

 

 

Just wanted to say thank you for this. This worked to enable the rsync server to sync to my Asustor AS5110T NAS. Thank you so much. I spent hours trying to get this to work before running across your post

  • Like 1
Link to comment
  • 2 months later...

Hey Guys!

 

I'm not able to get the rsync daemon to run config is 1:1 same as of the first post and no pid "cat: /var/run/rsyncd.pid: No such file or directory" and no connection to rsync server.

rsync: failed to connect to XXXXX.local (10.0.0.XX): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(127) [sender=3.1.3]

 

Line was pasted into /etc/inetd.conf after reboot or if I trigger "bash /boot/custom/etc/rc.d/S20-init.rsyncd"

 

# walld/1    dgram    rpc/udp    wait    root    /usr/sbin/tcpd    rpc.rwalld
#
# End of inetd.conf.
rsync   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon

 

Since I'm running newest unraid 6.9.2 was there a change to how inetd works?

 

 

I want also to add, if i start the daemon manually it's working (/usr/bin/rsync --daemon) which just gets me to the point that something is wrong with inetd.

 

Edited by LinuxARM
Link to comment
  • 3 weeks later...
On 5/19/2021 at 3:05 PM, LinuxARM said:

 


rsync: failed to connect to XXXXX.local (10.0.0.XX): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(127) [sender=3.1.3]

I want also to add, if i start the daemon manually it's working (/usr/bin/rsync --daemon) which just gets me to the point that something is wrong with inetd.

 

Hi, I can confirm this behavior as well in Unraid 6.9.2.  The inetd.conf does not seem to actually launch the rsyncd on connection.  As you said, I'm launching rsync --daemon via User Script at First Array Start instead.  Did you ever find a solution to the inetd issue?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...