Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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,rw=@192.168.1.21,root=@192.168.1.21
share|improve this question
add comment

1 Answer

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.