Specifies the MS-FSCC extensions for supporting POSIX compliant operating systems.
Date |
Protocol Revision |
Revision Class |
Downloads |
---|---|---|---|
|
Date |
Protocol Revision |
Revision Class |
Downloads |
---|---|---|---|
|
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-FSCC] specification. Popular servers such as Samba, Windows Server and others support SMB3 by default. These extensions are already implemented in multiple clients and servers.
|
3 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reserved |
Type |
S |
S |
S |
R |
W |
X |
R |
W |
X |
R |
W |
X |
Value |
Meaning |
---|---|
XO (0x00000001) |
Others have execute permission (S_IXOTH) |
WO (0x00000002) |
Others have write permission (S_IWOTH) |
RO (0x00000004) |
Others have read permission (S_IROTH) |
XG (0x00000008) |
Group has execute permission (S_IXGRP) |
WG (0x00000010) |
Group has write permission (S_IWGRP) |
RG (0x00000020) |
Group has read permission (S_IRGRP) |
XU (0x00000040) |
User has execute permission (S_IXUSR) |
WU (0x00000080) |
User has write permission (S_IWUSR) |
RU (0x00000100) |
User has read permission (S_IRUSR) |
ST (0x00000200) |
Sticky bit (S_ISVTX) |
SG (0x00000400) |
Set-group-ID bit (S_ISGID) |
SU (0x00000800) |
Set-user-ID bit (S_ISUID) |
Type |
The POSIX file type as an enumeration defined in POSIX File Type Definition |
Value |
Meaning |
---|---|
0 |
A regular file (S_IFREG) |
1 |
A directory (S_IFDIR) |
2 |
A symlink (S_IFLNK) |
3 |
A character device (S_IFCHR) |
4 |
A block device (S_IFBLK) |
5 |
A FIFO (S_IFIFO) |
6 |
A socket (S_IFSOCK) |
Refer to section 2.4 of [MS-FSCC] for additional details. This section only explains details relevant to the FilePosixInformation info class.
File information class |
Level |
Uses |
---|---|---|
0x64 |
Query |
This information class is used to query file posix information.
A FILE_POSIX_INFORMATION data element, defined as follows, is returned by the server.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CreationTime |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
LastAccessTime |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
LastWriteTime |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
ChangeTime |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
EndOfFile |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
AllocationSize |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
FileAttributes |
|||||||||||||||||||||||||||||||
Inode |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
Device |
|||||||||||||||||||||||||||||||
Reserved |
|||||||||||||||||||||||||||||||
NumberOfLinks |
|||||||||||||||||||||||||||||||
ReparseTag |
|||||||||||||||||||||||||||||||
POSIXMode |
|||||||||||||||||||||||||||||||
OwnerSID (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
GroupSID (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
FilenameLength |
|||||||||||||||||||||||||||||||
Filename (variable) |
|||||||||||||||||||||||||||||||
... |
CreationTime (8 bytes): The time when the file was created; see section 2.1.1 of [MS-FSCC]. A valid time for this field is an integer greater than or equal to 0. When setting file attributes, a value of 0 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. When setting file attributes, a value of -2 indicates to the server that it MUST change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -2.
LastAccessTime (8 bytes): The last time the file was accessed; see section 2.1.1 of [MS-FSCC]. A valid time for this field is an integer greater than or equal to 0. When setting file attributes, a value of 0 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. When setting file attributes, a value of -2 indicates to the server that it MUST change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -2.
LastWriteTime (8 bytes): The last time information was written to the file; see section 2.1.1 of [MS-FSCC]. A valid time for this field is an integer greater than or equal to 0. When setting file attributes, a value of 0 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. When setting file attributes, a value of -2 indicates to the server that it MUST change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -2.
ChangeTime (8 bytes): The last time the file was changed; see section 2.1.1 of [MS-FSCC]. A valid time for this field is an integer greater than or equal to 0. When setting file attributes, a value of 0 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. When setting file attributes, a value of -2 indicates to the server that it MUST change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -2.
EndOfFile (8 bytes): The size of the file.
AllocationSize (8 bytes): The size allocated on disk for the file.
FileAttributes (4 bytes): A 32-bit unsigned integer that contains the file attributes. Valid file attributes are specified in section 2.6 of [MS-FSCC].
Inode (8 bytes): The POSIX inode for the file.
FileId (4 bytes): The POSIX fileId for the file.
Reserved (4 bytes): A 32-bit field. This field is reserved. This field can be set to any value, and MUST be ignored.
NumberOfLinks (4 bytes): The number of hard links to the file.
ReparseTag (4 bytes): The reparse tag, as defined in section 2.1.2.1 of [MS-FSCC].
POSIXMode (4 bytes): The POSIX mode as defined in POSIX-FSCC 2.1.1.
OwnerSID (variable): The owner SID as defined in Microsoft Security identifiers.
GroupSID (variable): The group SID as defined in Microsoft Security identifiers.
FilenameLength (4 bytes): The length, in bytes, of the filename.
Filename (variable): A variable-length buffer containing the filename, the length specified by FilenameLength.
Refer to section 2.5 of [MS-FSCC] for additional details. This section only explains details relevant to the FileFsPosixInformation info class.
File system information class |
Level |
Uses |
---|---|---|
0x64 |
Query |
This information class is used to query file system posix information.
A FILE_FS_POSIX_INFORMATION data element, defined as follows, is returned by the server.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OptimalTransferSize |
|||||||||||||||||||||||||||||||
BlockSize |
|||||||||||||||||||||||||||||||
TotalBlocks |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
BlocksAvailable |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
UserBlocksAvailable |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
TotalFileNodes |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
FreeFileNodes |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
FsIdentifier |
|||||||||||||||||||||||||||||||
... |
OptimalTransferSize (4 bytes): The preferred length
of I/O requests for files on this file system., from
struct statvfs.f_bsize
.
BlockSize (4 bytes): The size in bytes of the
minimum unit of allocation on this filesystem, from
struct statvfs.f_frsize
.
TotalBlocks (8 bytes): Size of filesystem in
BlockSize units, from struct statvfs.f_blocks
.
BlocksAvailable (8 bytes): Number of free blocks in
BlockSize units, from struct statvfs.f_bfree
.
UserBlocksAvailable (8 bytes): Number of free blocks
for unprivileged users in BlockSize units, from
struct statvfs.f_bavail
.
TotalFileNodes (8 bytes): Number of inodes, from
struct statvfs.f_files
.
FreeFileNodes (8 bytes): Number of free inodes, from
struct statvfs.f_ffree
.
FsIdentifier (8 bytes): Filesystem ID, from
struct statvfs.f_fsid
.