QNAP NAS: configure rsyncd/rsync with extended ACL rights

December 21, 2011

Some Network Attached Storage (NAS) servers like the QNAP-419 NAS do not support extended ACLs in their rsyncd. To fix this issue you can install a new ACL enabled rsyncd to your original one. This is a guide of how to install the new ACL enabled rsyncd.

This tutorial will show how to install a new ACL enabled rsyncd to a TS-419U+ Turbu NAS, (ARM based, Linux 2.6.33.2, firmware 3.5.1 Build 1002T). After the installation the rsync will support extended ACLs:

Step 1: Setup optware packet manager

Open QNAP’s web interface and navigate to Application Servers / QPKG Plugins. Under the tab “INSTALLATION” on the right side click on “GET QPKG”. In the popup window scroll down to “Optware IPKG” and download it. Close the popup and install the package. For a detailed description head over to the qnap wiki.

Enable SSH access to your qnap
Navigate to Network Services / Telnet+SSH and check “Allow SSH connection”.

Enable rsync server
Navigate to Application Servers / Backup Server and check the following options:

  • Enable backup from a remote server to the local host
  • Allow remote Rsync server to back up data to NAS

Also set a username and a password (in our case its rsync/rsync).

Check the currently installed version
Login to your qnap and run rsync:

Our problem is marked yellow: no ACLs!

Step 2: Compile rsync

Install some dependencies

Because of the following awk/sed problems we install the current version of sed/gawk:
awk: ./confadNmun/subs.awk:2: Unexpected token (more about this here).

We need to get the acl sources because of the acl.h header file that is missing:

Download and configure rsync

Copy the acl header files to the rsync directory. This is important, because configure will search for sys/acl.h:

Configure

Looks fine!

Step 3: Build and install rsync

Validate the result

Now we have ACL support!

Install the new rsync next to the exisiting, original version

Integrate rsyncd to the boot process (init.d)

Create your own init script based on the original dynamically created configuration rsyncd.conf. This instance of the rsyncd listens to the defined port+1, e.g. 873 for the original rsyncd, 874 for the ACL-enabled rsyncd.

We will not replace the original rsyncd, because it’s a patched version from qnap with additional commandline parameters.

/opt/bin/rsyncd-acl.sh

Modify the original init start script to start/stop our new rsyncd:

/etc/init.d/rsyncd.sh

Step 4: Test it

Try to rsync an ACL based directory to your qnap.

On qnap:

On your server:

Should work now :-)

This page: Print Send by email Share on:
  • Dan

    Thanks for the tutorial, very helpful and clear!