[POSIX-FSA] POSIX Extensions to MS-FSA

Specifies the MS-FSA extensions for supporting POSIX compliant operating systems.

Published Version

Date

Protocol Revision

Revision Class

Downloads

6/30/2026

1.0.0

Major

PDF | HTML

Previous Versions

Date

Protocol Revision

Revision Class

Downloads

8/13/2024

0.04

Minor

PDF | HTML

1 Introduction

The SMB3 POSIX Extensions are extensions to enable POSIX compliant operating systems to better interoperate with SMB3 servers and storage appliances. This document specified the extensions to the [MS-FSA] specification. Popular servers such as Samba, Windows Server and others support SMB3 by default. These extensions are already implemented in multiple clients and servers.

2 Algorithm Details

2.1 Object Store Details

2.1.1 Abstract Data Model

2.1.1.1 Per Volume

SupportsPosix: A boolean that is TRUE if the volume's filesystem supports POSIX semantics.

statvfs: POSIX struct statvfs filesystem metadata. The implementation may map any of the struct statvfs members to existing MS-FSA 2.1.1.1 "Per Volume" attributes.

2.1.1.2 Per File

stat: POSIX stat metadata:

2.1.1.3 Per Open

IsPosix: A boolean that is TRUE if this open is a POSIX open.

2.1.2 Initialization

Volume.SupportsPosix MUST be initialized in an implementation defined manner.

2.1.3 Common Algorithms

2.1.3.1 Algorithm for Detecting If Open Files Exist Under a Directory

When processing the following condition from MS-FSA 2.1.4.2:

and the condition is TRUE, the object store MUST additionally check:

2.1.3.2 Algorithm for Determining If a Range Access Conflicts with Byte-Range Locks

If ByteRangeLock.OwnerOpen.IsPosix is True, the lock is advisory and the object store MUST ignore this lock when determining if a range access conflicts with read or write operations.

2.1.4 Higher-Layer Triggered Events

2.1.4.1 Server Requests an Open of a File

The server provides the following additional parameters:

PosixSemantics: A boolean that is TRUE if the server is requesting an open with POSIX semantics.

If PosixSemantics is FALSE the remainder of this section MUST be skipped. Otherwise the below processing MUST be done in addition to the processing from MS-FSA.

Phase 8 -- Completion of open

Open.IsPosix MUST be set to TRUE.

2.1.4.1.1 Creation of a New File
2.1.4.1.2 Open of an Existing File
2.1.4.1.2.1 Algorithm to Check Access to an Existing File

If Open.IsPosix is FALSE, the remainder of this section MUST be skipped.

The condition:

If ((File.FileAttributes.FILE_ATTRIBUTE_READONLY || File.Volume.IsReadOnly) &&
CreateOptions.FILE_DELETE_ON_CLOSE), then return STATUS_CANNOT_DELETE.

MUST be changed to do the following:

If CreateOptions.FILE_DELETE_ON_CLOSE is FALSE, the remainder of this section MUST be skipped.

If File.Volume.IsReadOnly, return STATUS_CANNOT_DELETE.

If Open.FileAttributes.FILE_ATTRIBUTE_READONLY is TRUE and not Open.GrantedAccess.FILE_WRITE_ATTRIBUTES and not AccessCheck(SecurityContext, File.SecurityDescriptor, FILE_WRITE_ATTRIBUTES):

2.1.4.2 Server Requests Closing an Open

Phase 3 - File Deletion:

Processing of the following condition:

If Open.Link.DeleteUsingPosixSemantics is FALSE:
- If Open.Link.IsDeleted is TRUE and there does not exist an ExistingOpen in
  Open.File.OpenList that has ExistingOpen.Link equal to Open.Link:

MUST be changed to:

The algorithm uses the following local variables:
- A boolean initialized to FALSE: HavePosixOpen
- A boolean initialized to FALSE: HaveWindowsOpen

If Open.Link.DeleteUsingPosixSemantics is FALSE:
- If Open.Link.IsDeleted is TRUE:
  - For each ExistingOpen in Open.File.OpenList that has
    ExistingOpen.Link equal to Open.Link:
    - If ExistingOpen.IsPosix is FALSE:
      - Set HaveWindowsOpen to TRUE
    - Else:
      - Set HavePosixOpen to TRUE
    - EndIf
  - EndFor
  - If HaveWindowsOpen is FALSE:
    - Remove Open.Link from Open.File.LinkList
    - Remove Open.Link from Open.Link.ParentFile.DirectoryList
    - Set LinkDeleted to TRUE
    - If Open.File.LinkList is empty:
      - Set FileDeleted to TRUE
    - EndIf
    - If HavePosixOpen is TRUE:
      - Add Open.Link to a list that is used to track deleted
        files that are open
    - EndIf
  - EndIf
- EndIf

2.1.4.3 Server Requests Querying a Directory

2.1.4.3.1 Directory Information Queries
2.1.4.3.1.1 FilePosixInformation

OutputBuffer is of type FILE_POSIX_INFORMATION as defined in POSIX-FSCC 2.2.1 "FilePosixInformation".

OutputBuffer is an array of one or more FILE_POSIX_INFORMATION structures as described in POSIX-FSCC 2.2.1 "FilePosixInformation". Entry is a parameter to this routine that points to the current FILE_POSIX_INFORMATION structure to fill out. Note that the FileName field is not set in this section.

Pseudocode for the operation is as follows:

Entry MUST be constructed as follows:

2.1.4.4 Server Requests a Byte-Range Lock

If Open.IsPosix is False, the reminder of this section MUST be skipped.

Otherwise. the object store MUST process the lock request according to POSIX proposal "Open File Description Locks" (OFD) semantics:

2.1.4.5 Server Requests an Unlock of a Byte-Range

If Open.IsPosix is False, the reminder of this section MUST be skipped.

Otherwise, the object store MUST process the unlock request according to POSIX semantics:

The unlock operation MUST unlock any range of POSIX locks in the specified range held by the same Open:

2.1.4.6 Server Requests a Query of File Information

2.1.4.6.1 FilePosixInformation

OutputBuffer is of type FILE_POSIX_INFORMATION as defined in POSIX-FSCC 2.2.1 "FilePosixInformation".

Pseudocode for the operation is as follows:

Upon successful completion of the operation, the object store MUST return:

2.1.4.7 Server Requests a Query of File System Information

2.1.4.7.1 FileFsPosixInformation

OutputBuffer is of type FILE_FS_POSIX_INFORMATION, as described in POSIX-FSCC 2.3.1.

Pseudocode for the operation is as follows:

OutputBuffer MUST be constructed as follows:

Upon successful completion of the operation, the object store MUST return:

2.1.4.8 Server Requests Setting of File Information

2.1.4.8.1 FileDispositionInformation

If Open.IsPosix is FALSE, the remainder of this section MUST be skipped.

Otherwise, the server MUST replace the following check

If File.FileAttributes.FILE_ATTRIBUTE_READONLY is TRUE, the operation MUST
be failed with STATUS_CANNOT_DELETE.

with:

If Open.FileAttributes.FILE_ATTRIBUTE_READONLY is TRUE and Open.GrantedAccess does not incluce FILE_WRITE_ATTRIBUTES and not AccessCheck(SecurityContext, File.SecurityDescriptor, FILE_WRITE_ATTRIBUTES):

2.1.4.8.2 FileDispositionInformationEx

If Open.IsPosix is FALSE, the remainder of this section MUST be skipped.

Otherwise, the server MUST replace the following clause

- If File.FileAttributes.FILE_ATTRIBUTE_READONLY:
  - If not InputBuffer.Flags.FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE or
    not Open.GrantedAccess.FILE_WRITE_ATTRIBUTES:
    - The operation MUST be failed with STATUS_CANNOT_DELETE.

with:

If Open.FileAttributes.FILE_ATTRIBUTE_READONLY is TRUE and Open.GrantedAccess does not incluce FILE_WRITE_ATTRIBUTES and not AccessCheck(SecurityContext, File.SecurityDescriptor, FILE_WRITE_ATTRIBUTES):