# Autofs can mount NFS folder which shouldn't be mounted, and can't access it



## zjlinickey (May 31, 2018)

Hi to all!

My NFS client use autofs to mount the folder shared by NetApp storage. And there are some problems,

On the NetApp NFS server, I restrict what ip can mount a folder, named "folderA"

NFS client not in the ip range, but I can mount folderA by using autofs, strictly speaking, I can see folderA.

When I access folderA, it will be not responding and the dmesg will show "WARNING: autofs_trigger_one: request for /net/folderA completed with error 5"

But when I use mount_nfs command to mount folderA, it will show "Permmission denied"

Because our have several servers, we want have a single autofs map, all server use the map

The NFS server control which one can mount which folders

In our environment, there are Arch, CentOS both can't see folderA

Is there any method to solve the problem? Thanks!


----------



## k.jacker (Jun 8, 2018)

zjlinickey said:


> ...I can mount folderA...


There is nothing mounted on your folderA, it get's created by autofs on the client to eventually mount something on it.

The -i option for automountd could be what you are searching for, I use it, too.
On your client, add to /etc/rc.conf

```
automountd_flags="-i"
```

From automountd(8)


----------

