# NFS:  export subdirectories and permissions with wildcards

## rizzo

I have two NFS problems.

1.  I'm exporting my /usr/portage, however I'm trying to do it cleanly and I want to export /usr/portage as read-only, and export /usr/portage/packages and /usr/portage/distfiles as rw.  My /etc/exports looks like this:

```
# /etc/exports: NFS file systems being exported.  See exports(5).

/usr/portage    10.200.1.67(ro,sync)

/usr/portage/distfiles  10.200.1.67(rw,no_root_squash,sync)

/usr/portage/packages   10.200.1.67(rw,no_root_squash,sync)
```

However when I run exportfs -a I get "Invalid argument" errors for the two subdir lines.

2.  When I export a dir, I have to specify the exact host (either name or IP) that I want to export to in order for that host to be able to mount.  If I say *.lan.mydomain.com, the client will get a "permission denied" error.

----------

## ebrostig

I used your exportfs file and subsituted the ip with one of mine. When I ran exportfs -a, I got no errors at all. Which version of nfs-utils do you use? And which version of the kernel?

```

emerge -p nfs-utils

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R  ] net-fs/nfs-utils-1.0.1

```

Erik

----------

## rizzo

I'm on 1.0.1 of nfs-utils as well.  Running gentoo-sources-2.4.19-r5.

Results of uname -a:

```
Linux orthanc.xxxx.com 2.4.19-gentoo-r5 #1 SMP Mon Dec 23 15:33:02 CST 2002 i686 Intel(R) Pentium(R) 4 CPU 1400MHz GenuineIntel GNU/Linux
```

changed my domain to protect the innocents.

----------

## rizzo

OK now I'm on vanilla-sources 2.4.20 and when I do the export I get the "Invalid argument" error on the first line (/usr/portage).

Wacky.

----------

