We help IT Professionals succeed at work.

NFS on FreeBSD: cannot mount /usr/src as read-write, only as read.

thiamwah asked
hi guys,

I am using FreeBSD 4.x. I find I cannot mount "usr/src" on the client NFS as read-write, only as read only. How do I fix it ?

My build (NFS) server :
drwxr-xr-x  20 root  wheel      512 Aug 22 19:29 usr
/usr/src -ro <-- can only mount as read-only ?

bash-2.04$ showmount -e
Exports list on localhost:

If I mount as read write, as in "/usr/src" in /etc/exports,
"showmount" does not show anything.

On the client side, it says "permission denied".
What is the problem? Please advice.
Watch Question

Top Expert 2005
If you export a volume read-only (ro option in exports), then of course all clients are restricted to read-only access. Since you will be using /usr/src to do a 'make world' you need /etc/exports to contain:

/usr/src maproot=root

assuming that is the IP of the system that will mount the exported file system.  To keep things in /usr/src sane, you want to include the maproot option so that root can manipulate the contents of /usr/src and so that the file ownership and perms remans correct. In all likelyhood you'll probably want to export /usr/ports the same way.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.