On OS server.

root at nas1:~# share -F nfs -o rw,root /files/files

   On Ubuntu client.

root at www:~# mount 192.168.10.50:/files/files /mnt/test
root at www:~# cd /mnt/test/
root at www:/mnt/test# ls
root at www:/mnt/test# touch ff
touch: cannot touch `ff': Permission denied
root at www:/mnt/test# ls -ld
drwxr-xr-x+ 2 root root 2 Sep 13 02:25 .
root at www:/mnt/test# id
uid=0(root) gid=0(root) groups=0(root)

   Now, here is something strange, using same setup from above.

   On server.

root at nas1:~# cd /files/files/
root at nas1:/files/files# mkdir tmp
root at nas1:/files/files# chmod 777 tmp/

   On client

root at www:/mnt/test# cd tmp/
root at www:/mnt/test/tmp# ls -l
total 0
root at www:/mnt/test/tmp# touch ff
root at www:/mnt/test/tmp# ls -l
total 1
-rw-r--r--+ 1 4294967294 4294967294 0 Sep 13 14:30 ff
root at www:/mnt/test/tmp# su - www-data
www-data at www:~$ cd /mnt/test/tmp/
www-data at www:/mnt/test/tmp$ touch tt
www-data at www:/mnt/test/tmp$ ls -l
total 1
-rw-r--r--+ 1 4294967294 4294967294 0 Sep 13 14:30 ff
-rw-r--r--+ 1 www-data   www-data   0 Sep 13 14:33 tt

   Looks like files created by root on the client get mapped to some  
other user.  Mat be related to reason why I can't create files as root  
in the root of the mount.

   And to answer the other question, this is not production.  It's at  
home right now.

Thanks for the help so far.
Greg


On 2009-09-13, at 8:35 AM, Mike Gerdts wrote:

> On Sat, Sep 12, 2009 at 9:52 PM, Gregory Gee  
> <gregory.gee at sympatico.ca> wrote:
>> New to Solaris share, so bare with me.  On my OpenSolaris box, I  
>> type the  following.
>>
>> root at nas1:~# share -F nfs -o rw /files/files
>>
>> On my Ubuntu904 box, I type the following.
>>
>> root at www:~# mount 192.168.10.50:/files/files /mnt/test
>> root at www:~# touch /mnt/test/t
>> touch: cannot touch `/mnt/test/t': Permission denied
>>
>> So why can't I write?  If it matters, /files on the server is zfs/ 
>> zraid1.
>
> Because you are trying to do it as root but did not export it to be
> writable by root.  On the client:
>
> ls -ld /mnt/test
> su - <owner displayed by ls>
> cd /mnt/test
> touch t
>
> If you need root to be able to write to it, on the server:
>
> share -F nfs -o rw,root /files/files
>
> If this is in anyplace other than a toy environment, be sure to give a
> list of hosts that should have access with rw=...,root=... .
>
>>
>> root at nas1:~# zfs list files
>> NAME    USED  AVAIL  REFER  MOUNTPOINT
>> files    76K   146G    25K  /files
>>
>>
>> Thanks,
>> Greg
>> --
>> This message posted from opensolaris.org
>> _______________________________________________
>> nfs-discuss mailing list
>> nfs-discuss at opensolaris.org
>>
>
>
>
> -- 
> Mike Gerdts
> http://mgerdts.blogspot.com/
>

Reply via email to