Now it is weird that it is read only. According to exports manual, it should
be read / write as default:
The -ro option specifies that the filesystem should be exported
read-only
(default read/write). The option -o is a synonym for -ro in an effort
to
be backward compatible with older export file formats.
My exports doesnât contain a -ro.
# cat /etc/exports
/nfs -mapall=nfs -alldirs -network=192.168.1 -mask=255.255.255.0
I cannot write even on the server (192.168.1.1):
# mount -t nfs -o rw 192.168.1.1:/nfs /mnt
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/wd0a 3.9G 52.3M 3.7G 1% /
/dev/wd0k 9.9G 4.0K 9.4G 0% /home
/dev/wd0l 1.7T 8.0K 1.6T 0% /nfs
/dev/wd0d 3.9G 4.0K 3.7G 0% /tmp
/dev/wd0f 9.8G 310M 9.0G 3% /usr
/dev/wd0g 3.9G 2.0K 3.7G 0% /usr/X11R6
/dev/wd0h 9.8G 216K 9.3G 0% /usr/local
/dev/wd0j 9.8G 2.0K 9.3G 0% /usr/obj
/dev/wd0i 9.8G 2.0K 9.3G 0% /usr/src
/dev/wd0e 9.8G 5.4M 9.3G 0% /var
192.168.1.1:/nfs 1.7T 8.0K 1.6T 0% /mnt
# touch /mnt/h.txt
touch: /mnt/h.txt: Permission denied
Best regards,
Zhi-Qiang Lei
> On Mar 6, 2015, at 2:51 PM, Zhi-Qiang Lei <[email protected]> wrote:
>
> It works like a charm! Thank you!
>
> $ sudo mount_nfs -P 192.168.1.1:/nfs mnt
> $ df -h
> Filesystem Size Used Avail Capacity iused ifree %iused
Mounted on
> /dev/disk1 112Gi 107Gi 5.0Gi 96% 28016815 1310543 96% /
> devfs 185Ki 185Ki 0Bi 100% 640 0 100% /dev
> map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
> map auto_home 0Bi 0Bi 0Bi 100% 0 0 100%
/home
> 192.168.1.1:/nfs 1.7Ti 8.0Ki 1.6Ti 1% 1 58738941 0%
/Users/siegfried/mnt
>
> Best regards,
> Zhi-Qiang Lei
>
>> On Mar 6, 2015, at 12:21 AM, Gabriel Kihlman <[email protected]
<mailto:[email protected]>> wrote:
>>
>> Zhi-Qiang Lei <[email protected] <mailto:[email protected]>>
writes:
>>>
>>> $ sudo mount -t nfs 192.168.1.1:/nfs mnt
>>> Password:
>>> mount_nfs: can't mount /nfs from 192.168.1.1 onto /Users/siegfried/mnt:
>>> Permission denied
>>>
>>> What could be the problem? How can I debug it? Thanks.
>>
>> It used to be that you needed to mount with -P from mac:
>>
>> sudo mount_nfs -P server.address:/path/to/share /path/to/local/directory
>>
>> Not sure if that is still the case but it might be worth a try?
>>
>> /gabriel