3.1 Example 1: Access a File in a Workgroup

Access a File in a Workgroup is illustrative of typical User interaction with the File Access Services System as a User locates a file server and a share on it, obtains a directory listing, and then reads the file content. This example demonstrates the use case described in section 2.5.1.

Prerequisites

All general requirements as set forth in section 2.4 Assumptions and Preconditions are met.

  • A file exists in the shared directory of the file server.

Initial System State

  • None.

Final System State

The user has obtained access to a specific file within their workgroup.

Sequence of Events

This example is divided into four tasks:

  1. Identify the target server.

  2. Display the list of shares on a file server.

  3. Enumerate a directory using the SMB protocol.

  4. Read a file using the SMB protocol.

Task 1: Identify the target server

This can be obtained from your storage administrator.

Task 2: Display the List Of Shares on a File Server

The file client uses the SRVS protocol to get the list of shares on a file server as described in the following sequence.

Sequence diagram for Display the list of shares on a file server

Figure 10: Sequence diagram for Display the list of shares on a file server

  1. The file client sends a NetrShareEnum request to the SMB file service (as described in [MS-SRVS] section 3.1.4.8) in order to retrieve the list of shares.

  2. The SMB file service responds to the file client with a NetrShareEnum response, containing a list of shares, as described in [MS-SRVS] section 3.1.4.8.

Task 3: Enumerate a Directory Using the SMB Protocol

  1. The SMB file client uses the mechanisms described in [MS-DFSC] section 3.1.4.1 to determine if the path references a DFS namespace. The path in this example does not reference a DFS namespace, the file client performs the Common Task 1 Open a File in an SMB File Share sequence to obtain a handle to the directory represented by UncPath.

  2. The file client performs the Common Task 2 Enumerate a Directory Using the SMB Protocol sequence to enumerate the contents of the directory and their attributes.

  3. The file client performs the Common Task 4 Close a File Using the SMB Protocol sequence to close the directory handle previously opened.

Task 4: Read a File By Using the SMB Protocol

  1. The SMB Application performs the Common Task 1 Open a File in an SMB File Share sequence in order to obtain a handle to the file represented by UncPath.

  2. The SMB Application performs the Common Task 3 Read a file using the SMB protocol sequence to obtain the contents of the file.

  3. The SMB Application performs the Common Task 4 Close a File Using the SMB Protocol sequence to close the file handle previously opened.