# [solved] NFS and different "sec="

## Psi15

Hi!

I've set up my machine using Kerberos 5 to mount the home directory of the users. The server on the other hand is also exporting the /usr/portage/distfiles directory. Unfortunately I cannot state a different sec= parameter for the distfiles share than for the home share (if I try to mount when those parameters don't match I get an "operation not permitted" error). Is it simply not possible to use different security flavors on different shares in NFS4?

Not working /etc/exports:

```

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

/exports                *(fsid=0,rw,async,no_subtree_check,sec=krb5p)

/exports/home           *(rw,async,no_subtree_check,sec=krb5p)

/exports/distfiles      *(rw,async,no_subtree_check,sec=sys)

/exports/gd             *(rw,async,no_subtree_check,sec=krb5p)

```

working /etc/exports:

```

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

/exports                *(fsid=0,rw,async,no_subtree_check,sec=krb5p)

/exports/home           *(rw,async,no_subtree_check,sec=krb5p)

/exports/distfiles      *(rw,async,no_subtree_check,sec=krb5p)

/exports/gd             *(rw,async,no_subtree_check,sec=krb5p)

```

Last edited by Psi15 on Tue Feb 01, 2011 9:31 pm; edited 1 time in total

----------

## Psi15

Ha - I fixed it...

here's the correct /etc/exports:

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

/exports                *(fsid=0,rw,async,no_subtree_check,sec=krb5p:sys)

/exports/home           *(rw,async,no_subtree_check,sec=krb5p)

/exports/distfiles      *(fsid=1,rw,async,no_subtree_check,sec=sys,no_root_squa$

/exports/gd             *(rw,async,no_subtree_check,sec=krb5p)
```

----------

