Partager via


NfsShareConfig schema

Describes the schema for Network File System (NFS) configuration files.

The following table lists all of the elements in this schema, sorted alphabetically by name.

Element Description
[AnonymousAccess](element-anonymousaccess.md)

If true, the NFS share is configured to allow access by anonymous users.

[AnonymousGid](element-anonymousgid.md)

The group identifier to be used for anonymous users accessing the share.

[AnonymousUid](element-anonymousuid.md)

The user identifier to be used for anonymous users accessing the share.

[Authentication](element-authentication.md)

The types of security that the NFS client can use when accessing a share.

[Encoding](element-encoding.md)

The language encoding of the NFS share.

[Name (in PermissionEntry)](element-1-name.md)

The hostname or IP address of the client, the name of the client group, or the name of the netgroup for which this share permission has been configured.

[Name (type: NonEmptyString)](element-name.md)

The name (alias) for the share.

[NetworkName](element-networkname.md)

The failover cluster client access point (network name) through which the highly available NFS share is exported.

[NfsShare](element-nfsshare.md)

Represents a share that is exported by the Windows NFS server.

[NfsShareConfig](element-nfsshareconfig.md)

Represents configuration settings for a Windows NFS server.

[NfsShares](element-nfsshares.md)

Contains [NfsShare](element-nfsshare.md) elements.

[Path](element-path.md)

The local path to the exported share on the Windows NFS server.

[Permission](element-permission.md)

The type of access granted for the NFS share.

[PermissionEntry](element-permissionentry.md)

Represents access permissions that apply to a share that is exported by the Windows NFS server.

[PermissionList](element-permissionlist.md)

Contains [PermissionEntry](element-permissionentry.md) elements.

[PermissionTemplate](element-permissiontemplate.md)

A named container for a [PermissionList](element-permissionlist.md) element.

[PermissionTemplateId](element-permissiontemplateid.md)

Identifies a [PermissionTemplate](element-permissiontemplate.md) element by name.

[SharePermission](element-sharepermission.md)

Represents the access permissions that apply to a share that is exported by the Windows NFS server.

[UnmappedAccess](element-unmappedaccess.md)

If true, the NFS share is configured to allow unmapped UNIX user access by UID or GID.

[Value](element-value.md)

One type of security that the NFS client can use when accessing a share.

 

Examples

The following example shows the NFsShareConfig schema.

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<xsd:schema
    elementFormDefault="qualified"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="https://schemas.microsoft.com/nfs/2011/03/share"
    xmlns:nfsns="https://schemas.microsoft.com/nfs/2011/03/share"
    version="1.0"
    >
  <xsd:element name="NfsShareConfig">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element minOccurs="0" maxOccurs="1" name="NfsShares">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element maxOccurs="unbounded" name="NfsShare">
                <xsd:complexType>
                  <xsd:all>
                    <xsd:element name="Name" type="nfsns:NonEmptyString"/>
                    <xsd:element name="Path" type="nfsns:NonEmptyString"/>
                    <xsd:element minOccurs="0" name="NetworkName" type="nfsns:NonEmptyString"/>
                    <xsd:element minOccurs="0" name="AnonymousUid" type="xsd:unsignedInt"/>
                    <xsd:element minOccurs="0" name="AnonymousGid" type="xsd:unsignedInt"/>
                    <xsd:element minOccurs="0" name="UnmappedAccess" type="xsd:boolean" default="true"/>
                    <xsd:element minOccurs="0" name="AnonymousAccess" type="xsd:boolean" default="false"/>
                    <xsd:element minOccurs="0" name="SharePermission">
                      <xsd:complexType>
                        <xsd:choice>
                          <xsd:element minOccurs="1" maxOccurs="1" name="PermissionTemplateId" type="nfsns:NonEmptyString"/>
                          <xsd:element minOccurs="1" maxOccurs="1" name="PermissionList" type="nfsns:PermissionType"/>
                        </xsd:choice>
                      </xsd:complexType>
                    </xsd:element> 
                    <xsd:element minOccurs="0" name="Authentication">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element minOccurs="1" maxOccurs="4" name="Value" type="nfsns:AuthType"/>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:all>                  
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element minOccurs="0" maxOccurs="unbounded" name="PermissionTemplate">
          <xsd:complexType>
            <xsd:all>
              <xsd:element minOccurs="1" maxOccurs="1" name="PermissionList" type="nfsns:PermissionType"/>              
            </xsd:all>
            <xsd:attribute name="Name" type="nfsns:NonEmptyString" use="required"/>
          </xsd:complexType>          
        </xsd:element>
      </xsd:sequence>
      <xsd:attribute name="SchemaVersion" type="xsd:decimal" use="required"/>
    </xsd:complexType>
  </xsd:element>

  <xsd:simpleType name="EncodingType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Ansi"/>
      <xsd:enumeration value="Gb2312-80"/>
      <xsd:enumeration value="Ksc5601"/>
      <xsd:enumeration value="Big5"/>
      <xsd:enumeration value="Shift-Jis"/>
      <xsd:enumeration value="Euc-Kr"/>
      <xsd:enumeration value="Euc-Tw"/>
      <xsd:enumeration value="Euc-Jp"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="PermissionValueType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="ReadWrite"/>
      <xsd:enumeration value="No-Access"/>
      <xsd:enumeration value="ReadOnly"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="ClientType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Builtin"/>
      <xsd:enumeration value="Host"/>
      <xsd:enumeration value="ClientGroup"/>
      <xsd:enumeration value="NetGroup"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="AuthType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Sys"/>
      <xsd:enumeration value="Krb5"/>
      <xsd:enumeration value="Krb5i"/>
      <xsd:enumeration value="Krb5p"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="NonEmptyString">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name ="PermissionType">
    <xsd:sequence>
      <xsd:element minOccurs="0" maxOccurs="unbounded" name="PermissionEntry">
        <xsd:complexType>
          <xsd:all>
            <xsd:element minOccurs="1" name="Name">
              <xsd:complexType>
                <xsd:simpleContent>
                  <xsd:extension base="nfsns:NonEmptyString">
                    <xsd:attribute name="RootAccess" type="xsd:boolean" use="optional" default="false"/>
                    <xsd:attribute name="Type" type="nfsns:ClientType" use="required"/>
                  </xsd:extension>
                </xsd:simpleContent>
              </xsd:complexType>
            </xsd:element>
            <xsd:element minOccurs="0" name="Permission" type="nfsns:PermissionValueType" default="ReadOnly"/>
            <xsd:element minOccurs="0" name="Encoding" type="nfsns:EncodingType" default="Ansi"/>
          </xsd:all>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>    
  </xsd:complexType>  
</xsd:schema>

The following example shows a Network File System (NFS) configuration file.

<?xml version="1.0" encoding="utf-8"?>
<NfsShareConfig xmlns="https://schemas.microsoft.com/nfs/2011/03/share" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SchemaVersion="1.0">
  <NfsShares>
    <NfsShare>
      <Name>share1</Name>
      <Path>c:\NfsShares\share1</Path>
      <NetworkName>netname</NetworkName>
      <AnonymousUid>100</AnonymousUid>
      <AnonymousGid>200</AnonymousGid>
      <UnmappedAccess>true</UnmappedAccess>
      <AnonymousAccess>false</AnonymousAccess>
      <SharePermission>
        <PermissionList>
          <PermissionEntry>
            <Name Type="Host">host1</Name>
            <Permission>No-Access</Permission>
          </PermissionEntry>
          <PermissionEntry>
            <Name Type="ClientGroup">client2</Name>
            <Encoding>Ansi</Encoding>
            <Permission>No-Access</Permission>
          </PermissionEntry>
        </PermissionList>
      </SharePermission>
      <Authentication>
        <Value>Sys</Value>
        <Value>Krb5</Value>
        <Value>Krb5p</Value>
      </Authentication>
    </NfsShare>
    <NfsShare>
      <Name>sharename1</Name>
      <Path>sharepath1</Path>
      <NetworkName>netname</NetworkName>
      <AnonymousUid>100</AnonymousUid>
      <AnonymousGid>200</AnonymousGid>
      <UnmappedAccess>false</UnmappedAccess>
      <AnonymousAccess>false</AnonymousAccess>
      <Authentication>
        <Value>Sys</Value>
        <Value>Krb5</Value>
        <Value>Krb5i</Value>
      </Authentication>
      <SharePermission>
        <PermissionTemplateId>template1</PermissionTemplateId>            
      </SharePermission>
    </NfsShare>
  </NfsShares>
  <PermissionTemplate Name="template1">
    <PermissionList>
      <PermissionEntry>
        <Name Type="Host" RootAccess="false">newclient</Name>
        <Permission>ReadWrite</Permission>
        <Encoding>Ansi</Encoding>
      </PermissionEntry>
      <PermissionEntry>
        <Name Type="ClientGroup">newclient1</Name>
        <Permission>ReadOnly</Permission>
        <Encoding>Big5</Encoding>
      </PermissionEntry>
      <PermissionEntry>
        <Name Type="NetGroup">newclient2</Name>
        <Permission>No-Access</Permission>
        <Encoding>Big5</Encoding>
      </PermissionEntry>
    </PermissionList>    
  </PermissionTemplate>
  <PermissionTemplate Name="template2">
    <PermissionList>
      <PermissionEntry>
        <Name Type="NetGroup">newclient</Name>
        <Permission>ReadWrite</Permission>
        <Encoding>Euc-Kr</Encoding>
      </PermissionEntry>
      <PermissionEntry>
        <Name Type="ClientGroup">newclient1</Name>
        <Permission>ReadOnly</Permission>
        <Encoding>Euc-Tw</Encoding>
      </PermissionEntry>
      <PermissionEntry>
        <Name Type="Host" RootAccess="0">newclient2</Name>
        <Permission>No-Access</Permission>
        <Encoding>Euc-Jp</Encoding>
      </PermissionEntry>
    </PermissionList>    
  </PermissionTemplate>
</NfsShareConfig>