2.5.5.5 Perform a File Operation Using SMB
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 read or write the contents of the file or close the handle when the User has obtained a handle to a file in an SMB share directory and wants to perform an operation on the file.
Goal: To perform a file operation (such as read, write, or close) on a file in an SMB share directory.
Actors
Application
SMB File Service
File Client
Stakeholders
User
Preconditions
A file share has been created on the SMB File Service.
The User has successfully opened and obtained a handle to a file on the file share.
Data for the operation is supplied by the User if applicable.
Main Success Scenario
Trigger: The Application receives a request from the User to perform a file operation on a file for which the Application has a file handle.
The application directs the file client to identify the communication channel to the SMB file service for SMB access protocols from the file handle corresponding to the User's file.
The application directs the file client to perform the requested operation (read, write, or close) as described in [MS-SMB2] section 3.2.4.
The SMB file service performs the requested action and returns the result through the SMB file client to the Application in the format that corresponds to the operation requested in step 2.
Post Condition
File operations (such as read, modify, or delete) are performed on a file in an SMB share directory.
Extensions
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. Depending on when the connection failed, the share might or might not have been created.
If the requested operation is a read, and the SMB share being accessed supports hash generation (see [MS-SMB2] section 2.2.10), the SMB file client can take additional steps to retrieve data from, or publish data to, the Hosted Cache.
If user authentication or authorization fails, the use case ends with failure.
Variation (a): Performing the requested operation (read, write, or delete) using the protocol described in [MS-SMB]: All details identical to the use case described in this section, except that the protocol described in [MS-SMB] section 3.2.4 is used instead of the protocol described in [MS-SMB2].
Variation (b): Performing the requested operation (read, write, or delete) using the protocol described in [MS-CIFS]: All details identical to the use case described in this section, except that the protocol described in [MS-CIFS] section 2.2.4 is used instead of the protocol described in [MS-SMB2].