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.
Below is an example of the problem, and some mount data to assist. IP addresses have been removed.
brockwood@homestead-inc.com
[root@willy temp]# pwd /mnt/lucy/inetneo/temp [root@willy temp]# cp /etc/hosts . cp: preserving permissions for ./hosts: Operation not permitted [root@willy temp]# ls hosts [root@willy temp]# ls -al total 12 drwxrwxrwx 2 root bin 4096 Feb 13 13:15 . drwxrwxrwx 8 root bin 4096 Feb 12 16:23 .. -rwxrwxrwx 1 pcuser pcuser 92 Feb 13 13:18 hosts [root@willy temp]# mount ---Snipped Out----- x.x.x.x:/vol/vol0/inetneo on /mnt/lucy/inetneo type nfs (rw,rsize=8192,wsize=8192,hard,intr,addr=x.x.x.x,addr=x.x.x.x) [root@willy temp]#
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