Users do not have privilege on mounted NFS

I apologize if this sounds like a noob question, but I am kind of new to Unix/FreeBSD and trying to learn how to make great use out of my old PC.

Now I am having a Macbook and a FreeBSD 7.2 on my old PC box. I want to set up a NFS on the FreeBSD box, so I can have another storages for my files other than those big piles of external hard drive on my desk.

I followed the instruction of FreeBSD handbook, but am not quite understand how to format the exports(5) file. Here is how my /etc/exports look like:

Code:
more /etc/exports 
#The following examples export /usr to 3 machines named after ducks,
#/usr/src and /usr/obj read-only to machines named after trouble makers,
#/home and all directories under it to machines named after dead rock stars
#and, /a to a network of privileged machines allowed to write on it as root.
#/usr                   huey louie dewie
#/home   -alldirs       janice jimmy frank
#/a      -maproot=0  -network 10.0.1.0 -mask 255.255.248.0
#
# You should replace these lines with your actual exported filesystems.
# Note that BSD's export syntax is 'host-centric' vs. Sun's 'FS-centric' one.

/exports -alldirs -maproot=root 192.168.1.100

the /exports is mountable on my Mac, but my mac does not have privilege in writing files on NFS.

Also, I tried to make all machines under 192.168.1.* to be able to mount the NFS as well. Is there a way to make all machines under my router to be able to mount the NFS without specifically specify their ip address in the /etc/exports ?
 
Make sure the permissions are set correctly on /exports. Have a look at the UID/GID of the Mac user. Make sure this lines up with the user's UID/GID on the fbsd box.

As for the IP range, try -network 192.168.1.0 -mask 255.255.255.0.
 
SirDice said:
Make sure the permissions are set correctly on /exports. Have a look at the UID/GID of the Mac user. Make sure this lines up with the user's UID/GID on the fbsd box.

Thanks for your help. The /exports directory has the permission of 777.

Code:
drwxrwxrwx   4 root  wheel      512 Jul  9 17:33 exports

And here are UIDs and GIDs from my Mac and FreeBSD box.

FreeBSD
Code:
uid=1001(username) gid=1001(username) groups=1001(username),0(wheel)

MacOS
Code:
uid=501(username) gid=20(staff) groups=20(staff),98(_lpadmin),101(com.apple.access_ssh),80(admin)


I am not sure if I completely understand about making all UIDs and GIDs all lined up. Does this mean that I need to make FreeBSD's UID and GID system the same format as my Mac by changing them from 100x to 50x? If so, how should I handle future users on FreeBSD box? Will I have to manually change all the new users to 50x format as well?

Thanks again for your help. I will try to change the UID and GID of FreeBSD box to match the system on MacOS and will let you know the outcome then.
 
Back
Top