Fran?ois Lapointe wrote: > Hi, > > I'm very new to Solaris. I managed to get snv-44 to work under Xen > (Slackware 11) and setup a hard disk with ZFS. I now have a ZFS pool with a > filesystem tank/media mounted to /export/media. I did 'zfs set sharenfs=on > tank/media' and the command 'share' shows: > # share > - /export/media rw "" > > Hence, everything seems good. > > On the client side (Slackware 11), the command > # mount -t nfs -o rw,tcp,intr,nfsvers=3,rsize=8192,wsize=8192 > 10.0.0.2:/export/media /mnt/tmp > mounts the filesystem as wished. I can access the filesystem and read from it > from the mount point '/mnt/tmp' (as root). > > The problem is when I try to create or copy a file to the NFS mount. It > fails with > 'cp: cannot create regular file `/mnt/tmp/foo.txt': Permission denied' > message. > > Any toughts? Thanks! > > Fran?ois > > > This message posted from opensolaris.org > _______________________________________________ > nfs-discuss mailing list > nfs-discuss at opensolaris.org > What are the directory permissions on /export/media?
Are you trying to read or write as root or a normal user? What you can do is this: server: ls -la /export/media cp /etc/default/nfs /export/media/bar.txt The first will show you the permission mask. You'll need to understand those. Then on the client: ls -la /mnt/tmp cat /mnt/tmp/bar.txt Check to see if you are root or a normal user at this point. Can you see the contents of the file? Try it as root and your normal user id. Okay, now try to create the file as root. And as a normal user. If they both fail, then on the server: chown -R user:group /export/media. User and group would be that of the uid and gid used on your client. If those do not have corresponding entries on the server, then just use the uid and gids. I.e.,: # chown -R tdh:staff /export/media or # chown -R 1001:100 /export/media would both work. And make sure the owner has write permissions: chmod u+rw /export/media Now repeat the test to create the file. If you can't create it as a normal user, then there is a problem. You should get a network trace of the NFS requests. Snoop and/or wireshark are your friends in that case. If you can't create it as root, well, that might be getting trampled. You'll need to tell the server to allow root access. Only do this if it is really required. zfs set sharenfs=rw,root=client I don't have an OpenSolaris box in front of me right now, but this should work. Consult the man page for zfs for help. Good luck!