none
SMB2 create file_attributes RRS feed

  • Question

  • MS-SMB2 section 2.2.13 says that FileAttributes should be ignored except when creating a file. I've found that Vista gives NT_STATUS_INVALID_PARAMETER for some values of this attribute even when the create disposition is set to OPEN.

    See frame 54 of http://samba.org/~tridge/vista_create.cap

    Cheers, Tridge

    Tuesday, May 27, 2008 3:14 AM

Answers

  • Tridge,

    After reviewing your question regarding the FileAttributes structure in the section, we will be updating the [MS-SMB2] documentation.  Section 2.2.13 FileAttributes definition will be updated as follows. 

     

    Original Text:

    FileAttributes (4 bytes): This field MUST be a combination of the values specified in [MS-FSCC] section 2.6. This field is only valid when a file is created.

     

    The server MUST ignore the FileAttributes field when opening an existing file, and the client SHOULD set the FileAttributes field to 0. <15>

     

    The server MUST ignore FileAttributes for pipe opens.

     

    For print files, if FileAttributes includes FILE_ATTRIBUTE_DIRECTORY the server MUST fail the open with the error code STATUS_NOT_SUPPORTED. All other attributes MUST be ignored by the server.

     

    Updated Text:

     

    FileAttributes (4 bytes): This field MUST be a combination of the values specified in [MS-FSCC] section 2.6, and MUST NOT include any values other than those specified in that section. This field is only valid when a file is created.

     

    When a client requests that a file be created or opened, if any bits other than those documented in [MS-FSCC] section 2.6 are set, the server MUST fail the request with STATUS_INVALID_PARAMETER.

     

    The server MUST ignore the FileAttributes field when opening an existing file, and the client SHOULD set the FileAttributes field to 0. <1>

     

    The server MUST ignore FileAttributes for pipe opens.

     

    or print files, if FileAttributes includes FILE_ATTRIBUTE_DIRECTORY the server MUST fail the open with the error code STATUS_NOT_SUPPORTED. All other attributes MUST be ignored by the server.

     

    Hopefully this answers your question.  Let me know if additional clarification is needed.

    Wednesday, June 25, 2008 4:13 PM

All replies

  •  

    Hi Andrew, I'm taking a look at your question on section 2.2.13 in the [MS-SMB2] protocol specification and will get back to you once I have compeleted some research.

     

    Thanks,

    Richard Guthrie - MSFT

     

    Thursday, May 29, 2008 2:18 PM
  •  

    Andrew,

     

    Hi Andrew, upon further investigation the behavior you describe in your initial post along with the network capture data points to a possible discrepancy in the documentation.  I am looking into this with our product team and will update you via this forum once I have an answer to your question. 

     

    Thanks for your diligent review and for reporting the issue.

     

    Richard Guthrie - MSFT

    Thursday, May 29, 2008 9:52 PM
  • Tridge,

    After reviewing your question regarding the FileAttributes structure in the section, we will be updating the [MS-SMB2] documentation.  Section 2.2.13 FileAttributes definition will be updated as follows. 

     

    Original Text:

    FileAttributes (4 bytes): This field MUST be a combination of the values specified in [MS-FSCC] section 2.6. This field is only valid when a file is created.

     

    The server MUST ignore the FileAttributes field when opening an existing file, and the client SHOULD set the FileAttributes field to 0. <15>

     

    The server MUST ignore FileAttributes for pipe opens.

     

    For print files, if FileAttributes includes FILE_ATTRIBUTE_DIRECTORY the server MUST fail the open with the error code STATUS_NOT_SUPPORTED. All other attributes MUST be ignored by the server.

     

    Updated Text:

     

    FileAttributes (4 bytes): This field MUST be a combination of the values specified in [MS-FSCC] section 2.6, and MUST NOT include any values other than those specified in that section. This field is only valid when a file is created.

     

    When a client requests that a file be created or opened, if any bits other than those documented in [MS-FSCC] section 2.6 are set, the server MUST fail the request with STATUS_INVALID_PARAMETER.

     

    The server MUST ignore the FileAttributes field when opening an existing file, and the client SHOULD set the FileAttributes field to 0. <1>

     

    The server MUST ignore FileAttributes for pipe opens.

     

    or print files, if FileAttributes includes FILE_ATTRIBUTE_DIRECTORY the server MUST fail the open with the error code STATUS_NOT_SUPPORTED. All other attributes MUST be ignored by the server.

     

    Hopefully this answers your question.  Let me know if additional clarification is needed.

    Wednesday, June 25, 2008 4:13 PM