smb on macos get [Errno 13] Permission denied <-- NT Status: STATUS_LOCK_NOT_GRANTED (0xc0000055)

NT Status: STATUS_LOCK_NOT_GRANTED (0xc0000055) No such file or directory. The file or directory name specified does not exist.
smb2.nt_status == 0xc0000055

发生在,当stream1 建立了一个fileid,并lock它:exclusive
然后 stream2 也create了一个fileid,想lock它时候:exclusive
得到了一个 error: NT Status: STATUS_LOCK_NOT_GRANTED (0xc0000055)

反应在上层: [Errno 13] Permission denied

另外,SMB抓包上,无ulock,都是lock request, 要看lock info来确定lock的内容:

Lock Info
    Length: 18446744073709551615
    Flags: 0x00000004, Unlock
        .... .... .... .... .... .... .... ...0 = Shared: False
        .... .... .... .... .... .... .... ..0. = Exclusive: False
        .... .... .... .... .... .... .... .1.. = Unlock: True
        .... .... .... .... .... .... ...0 .... = Fail Immediately: False
    Reserved: 00000000

猜你喜欢

转载自www.cnblogs.com/vivivi/p/12968907.html