Skip to content

setfacl: /mnt/nfs/filename.txt: Operation not supported

I was backing up a disk to a NFS server with rsync, and noticed that my posix ACL's were not being copied. The NFS server was mounted as version 4.1 and I was using rsync with the flags -aP.

Manually setting an ACL on a file from the client machine on the NFS server resulted in the error:
setfacl: /mnt/nfs/filename.txt: Operation not supported


The underlying fs on the server needs to support ACL's.
In my case fs on the server was ZFS and posixacl was enabled.
$ zfs set acltype=posixacl pool/backup

Using setfacl directly on the server was successful.

Solution:
With NFS 4.x you CANNOT use posix ACL's. You can use the special nfs4_setfacl provided by the nfs4-acl-tools package. This is completely useless when you want to backup files to NFS with rsync etc.

You need to use NFS version 3, so mount your NFS share with the -o vers=3 option.
Also you need to use rsync with -A so it copies the ACL's.

From the rsync manpage:
-A, --acls
This option causes rsync to update the destination ACLs to be the same as the source ACLs. The option also implies --perms.

My mount command:
mount -t nfs -o vers=3,rsize=32768,wsize=32768,intr,noatime 192.168.2.6:/backup /mnt/nfs/
My rsync commands (the 2e command is neat trick to copy subdirs in parallel):
# Single subdir sync (--delete-during because I want to delete old files from the destination)
rsync -aAP --delete-during /source/subdir/ /mnt/nfs/source/subdir/

# Parallel sync of all subdirs, 6 threads
SOURCE="/source/" && find $SOURCE -maxdepth 1 -mindepth 1 -type d | xargs -t -n1 -P6 -I% rsync -aAP --delete-during % /mnt/nfs$SOURCE

Posted by Nozzie on
Defined tags for this entry: , ,

PHP Fatal error: Uncaught Error: Class "Spoofchecker" not found in /roundcubemail/program/lib/Roundcube/rcube_spoofchecker.php:50

If you get the above error after upgrading to roundcube 1.5.0, this is the solution (when running apache).

Install and activate php-intl

For Arch Linux do a
pacman -S php-intl

then edit php.ini and uncomment the line
;extension=intl.so

Restart apache and done...

Use newer GCC on Centos 7

Original post: https://forums.centos.org/viewtopic.php?t=70838

Repository centos-sclo-rh is still with devtoolset-8 that has GCC-8.2.1:

# yum install centos-release-scl-rh
# yum install devtoolset-8-toolchain

# scl enable devtoolset-8 bash
# which gcc
/opt/rh/devtoolset-8/root/usr/bin/gcc
# exit
# which gcc
/usr/bin/gcc
Posted by Nozzie on