Setting NFS Export Options

On Compute Cloud@Customer, when you create a file system and export, the NFS export options for that file system are set to the defaults. The default values allow full access for all NFS client source connections. These defaults must be changed if you want to restrict access.

Caution

If a file system is mounted by any clients, creating, deleting, or editing the Source value can disrupt file system I/O operations.

Export Option in the Compute Cloud@Customer Console Export Option in the CLI Default Value Description
Source:

source

0.0.0.0/0

The IP address or CIDR block of a connecting NFS client.

Ports:

require-privileged-source-port

Any

Always set to:

  • UI: Any

  • CLI: false

Access:

access

Read/Write

Specifies the source NFS client access. Can be set to one of these values:

  • READ_WRITE

  • READ_ONLY

Squash:

identity-squash

None

Determines whether the clients accessing the file system as root have their User ID (UID) and Group ID (GID) remapped to the squash UID/GID. Possible values:
  • Root – Only the root user is remapped.

  • None – No users are remapped.

Squash UID/GID:

anonymous-uid and anonymous-gid

65534

This setting is used along with the Squash option. When remapping a root user, you can use this setting to change the default anonymousUid and anonymousGid to any user ID of your choice.

Note – If you change the RW/RO permissions of an export option for an SMB share, the changes are only enforced for newly network-mapped drives of that share. Any previously mapped drives of the same share retain the original permissions. To have the changed permissions enforced on previously mapped drives on SMB clients, disconnect the shares and map them again.

For more information about configuring the options to suit various access scenarios, see Export Options for File Storage.

    1. In the Compute Cloud@Customer Console navigation menu, click File Storage, then click File Systems.
    2. At the top of the page, select the compartment that contains the file system.
    3. Click the file system name.
    4. Under Resources, select Exports.
    5. Click the export's export path.

      The NFS Export Options are displayed.

    6. Click Edit Options.
    7. In the NFS Export Options dialog box, configure the NFS options.
    8. Click Update Options.
  • Use the oci fs export update command and required parameters to update the export information.

    oci fs export update --export-id <export_id> --export-options <file://json_file or json_string> [OPTIONS]

    Note – The require-privileged-source-port option can only be set to false.

    For a complete list of CLI commands, flags, and options, see the Command Line Reference.

  • Use the UpdateExport operation to update the export information.

    For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.