User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

It seems ACLs are more and more used by applications running on Debian rsp RaspberryOS. Unfortunately rsync does complain about ACLs with RC23 when files with ACLs are copied with rsync onto a nfs mounted partition. Today I detected it's possible but you have to use an important option when you mount a partition via nfs.

 

rsync uses posix ACLs which are supported by nfs version 2 and 3. But they are NOT supported by nfs version 4.

 

If you mount a nfs partition with following definition in /etc/fstab on a Raspberry

nfsServer:/srv/nfs /backup nfs rw,acl,noauto 0 0

the partition will be mounted with nfs version 4. Just check with mount

nfsServer:/srv/nfs on /backup type nfs4 (rw,relatime,vers=4.2,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1)

If you add nfsvers=3 in the fstab

nfsServer:/srv/nfs /backup nfs rw,acl,noauto,nfsvers=3 0 0

this will force the mount to use version 3

nfsServer:/srv/nfs on /backup type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,mountaddr=::1,mountvers=3,mountport=45824,mountproto=udp6,local_lock=none,addr=::1)

and you can successfully copy files with ACLs on the nfs mounted partition. But you have to add rsync option -A to copy ACLs. Option -a does not include option -A.

 

Unfortunately I wasn't able to get this to work with a Synology.

Add comment

*** Note ***

Comments are welcome. But in order to reject spam posts please consider following rules:
  1. Comments with string http are rejected with message You have no rights to use this tag
  2. All comments are reviewed by hand and thus it usually takes one day until a comment will be published.