Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Access restrictions for exported resources

About access restrictions  Top

When you export a resource, you can specify the access restrictions that govern how the resource can be mounted. If you export a resource without specifying access restrictions, it can be mounted read-write by all hosts.

You specify access restrictions using export options in the /etc/exports file or with command line options for the exportfs command. (These options are identical using either method.) Access restriction options determine

When multiple restrictions are applied to the same resource, the most restrictive option always takes precedence.

Meanings of access restriction options  Top

The root option

This option determines the user ID for the root user on the client who sends the NFS requests after mounting the resource. The following list describes the effect of including or excluding a host from the root option:

The rw option

It gives read-write access to the specified hosts. If no hosts are specified, all hosts have read-write access.

The ro option

It gives read-only access to the specified hosts. If no hosts are specified, all hosts have read-only access.

The anon option

It determines the UID for the root user on the client. The following table describes the effects of the anon option.

If...

Then...

The client is not specified by the root option for the resource

The UID specified by the anon option is the effective UID.

The client is specified by the root option for the resource

The UID specified by the anon option is not used. The effective UID is 0.

The following list describes the default UID specified by the anon option and the meanings of some special UIDs:

Interactions among options  Top

When Data ONTAP receives a mount request for a resource, it takes into consideration all options pertaining to the resource to determine applicable access restrictions.

Example

The /etc/exports file contains the following entry for the /vol/vol0 volume:

/vol/vol0 -ro=host1,root=host1,rw=host2

The ro and root options allow host1 to mount the /vol/vol0 volume with root access. The rw option, however, specifies that hosts other than host2 have only read access. Because the most restrictive option takes precedence, host1 can only mount the /vol/vol0 volume as a read-only resource.

Example

The /etc/exports file contains the following entry for the /vol/vol0 volume:

/vol/vol0 -ro=host1:host2,root=host1

The ro and root options allow host1 to mount the /vol/vol0 volume with root access. The ro option, however, makes the /vol/vol0 volume a read-only resource to all hosts. As a result, host1 can only mount the /vol/vol0 volume as a read-only resource.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments