Hello Toasters.
I've come across an odd cp problem from a Linux boxen to a NetApp filer. Typically these filers are mounted by the linux boxen simply for read-only purposes, but are actually read-write mounted. Some of our admins tried to cp files from the linux box up onto the filer, but we get an error that is unexpected. The file copies, but I don't like the error. Any ideas are helpful. One thing we did, just in case, was to add a local uid for the masked owner on the NetApps, since the ownership is changed once it hits the filer to "pcuser", uid 65534. This didn't change anything, though.
Your problem is NFS related, not just netapp.
When you export to a NFS client, you can optionally give the client root privilege on the NFS server. By default, this is off.
When this is off, the root user on the NFS client maps to user nobody (usually uid -2) on the server. The server handles NFS requests from root as if they came from an unprivileged user with uid -2.
To give a client root privilege, you need to set it up in /etc/exports. Here is an example where /vol/vol0 is exported rw to host1 and host2, but only host1 has root priv.
/vol/vol0 -access=host1:host2,root=host1
For security, you only want to give root priv. to a small number admin hosts.
You are getting that error because cp is trying to chown the file, which fails because root on the client does not have the necessary privilege on the server.
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support