1

I am trying to copy from an Ubuntu machine to a OmniOS ZFS pool shared via NFS. When I run the below command, I get:

cp: failed to preserve ownership for `./test.txt': Invalid argument

The thing is that the file copies fine but the permissions look like this at the destination:

-rw-------   1 nobody nogroup   7 Mar  4 21:35 test.txt

I then try:

chown root test.txt
chown: changing ownership of `test.txt': Invalid argument

I found this thread that is similar, but his/her error is more explicit with an "operation not permitted" error, whereas mine is "Invalid argument".

NFS is shared out from the ZFS server via below:

cat /etc/dfs/sharetab
/pool1/backup      -       nfs     sec=sys,[email protected],[email protected]

2 Answers 2

2

The issue is because I am mounting as NFSv4, and version 4 treats root permissions as 'nobody'. Forcing my NFS client to use NFS version 3 resolved my issue.

nfs -t nfs -o nfsvers=3,proto=tcp server:/pool1/backup /backup
1

You could also change the owner-group through idmap

into /etc/idmapd.conf

[Mapping]

Nobody-User = anyUserYouChoose
Nobody-Group = anyUserYouChoose

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .