On my Ubuntu server, I have several automounted zfs pools. The problem that I have, is that when I try to copy a file while preserving permissions, I get the following error:
cp: preserving permissions for `blah.txt': Operation not supported
Despite this, the file still duplicates, along with the original file attributes.
Can anyone help shed some light on this issue?
Solution: Disable ACL fabrication
It because of the extra ACL permissions
See & Upvote: https://superuser.com/questions/198758/what-does-the-mean-in-the-acl-output-of-ls-l
You get "preserving permissions for some: Operation not supported" when you
cp -p
from an NFS mount that has the extra ACL (ls -l
shows +'s) to something like /tmp which does not support the extra permissions.To fix this you first need to make your NFS server stop adding the extra permissions to new files. On a OpenSolaris or OpenIndiana ZFS box you can do it like this:
but instead of XXX put what you had before and add ",noaclfab" (see
man share_nfs
)You can also remove these extra ACLs for existing files:
Recursively:
To fix this on the client side, you can update these lines in /etc/sysconfig/autofs:
The "noacl" keyword is the relevant part, the other options are probably not required to work around this specific issue, but they are things to consider.
The
-p
option preserves several different types of file attributes, such as ownership, time, etc., and if any one of those was not properly preserved or had to undergo some sort of potentially lossy transformation then you might see that error. It's very possible that you were also perhaps indirectly instructing the process to preserve attributes (such as xattrs or acls) that you paid no attention to and contained no meaningful data.The bottom line is that if it preserves the attributes you're interested in, then don't worry.