2.5.5.4 Open a File in an SMB File Share - Application

This use case supports the Access a File in a Workgroup use case (section 2.5.1), the Access a File in a Domain use case (section 2.5.2), and the Two Applications Communicate via a Shared File use case (2.5.3).

Context of Use: To open or create a file when the User has located a shared directory and wants to open or create a file in that directory using the SMB network access protocol.

Goal: To open or create a file in a directory located in an SMB file share.

Actors

  • Application

  • SMB File Service

  • Authentication Service

  • File Client

Stakeholders

  • User

Preconditions

  • A file share has been created on the SMB File Service.

  • The User has located the path of the file or shared directory and has determined the desired open type (for example, "create a new file" or "open existing file").

Main Success Scenario

Trigger: Based on interactions with the User, the Application determines whether to open or create a file in a target directory.

  1. The Application directs the file client to establish a communication channel to an SMB File Service.

  2. The SMB File Service authenticates the User through the mechanisms as specified in [MS-AUTHSOD].

  3. The Application directs the file client to send a CREATE request to the SMB File Service (as specified in [MS-SMB2] section 3.2.4.3) to open a file with an appropriate CreateDisposition as specified in the same section.

  4. The SMB File Service authorizes the User using the mechanisms of [MS-SMB2] section 2.2.13, with an appropriate CreateDisposition as specified in the same section.

  5. The SMB File Service performs the create operation and returns a file handle to the Application.

Post Condition

The User will get the handle for the desired file in a shared directory located in an SMB file share.

Extensions

  1. If the communication channel cannot be established, or it becomes disconnected, the application can attempt to establish connection multiple times. Ultimately, the use case ends with failure.

  2. If user authentication fails, the use case ends with failure.

  3. If user authorization fails, the use case ends with failure.

  4. If the target of the file create resides in a DFS namespace and the File Client has indicated that it includes a mechanism to detect and traverse DFS namespaces, then the SMB File Service and file client perform additional DFS processing (see [MS-DFSC] section 3.1.4.1). If the file client has not indicated that it includes this mechanism, then the SMB File Service fails the operation. The file client communicates to the DFS service that resides on the Active Directory service to get the root servers.

Variation (a): Performing the operation using the protocol described in [MS-SMB]:All details are identical to the use case described in this section, except that the protocol described in [MS-SMB] section 2.2.4.9.1 is used instead of the protocol described in [MS-SMB2].

Variation (b): Performing the operation using the protocol described in [MS-CIFS]:All details are identical to the use case described in this section, except that the protocol described in [MS-CIFS] section 2.2.4.64 is used instead of the protocol described in [MS-SMB2].