Freigeben über


2.2.2.4 SMB Error Classes and Codes

This section provides an overview of status codes that can be returned by the SMB commands listed in this document, including mappings between the NTSTATUS codes used in the NT LAN Manager dialect, the SMBSTATUS class/code pairs used in earlier SMB dialects, and common POSIX equivalents. The POSIX error code mappings are based upon those used in the Xenix server implementation. This is not an exhaustive listing and MUST NOT be considered normative.

Each command and subcommand description also includes a list of status codes that are returned by CIFS-compliant servers. Individual implementations can return status codes from their underlying operating systems; it is up to the implementer to decide how to interpret those status codes.

The listing below is organized by SMBSTATUS Error Class. It shows SMBSTATUS Error Code values and a general description, as well as mappings from NTSTATUS values ([MS-ERREF] section 2.3.1) and POSIX-style error codes where possible. Note that multiple NTSTATUS values can map to a single SMBSTATUS value.

SUCCESS Class 0x00

Error code

NTSTATUS values

POSIX equivalent

Description

SUCCESS

0x0000

STATUS_OK

0

Everything worked, no problems.

ERRDOS Class 0x01

Error code

NTSTATUS values

POSIX equivalent

Description

ERRbadfunc

0x0001

STATUS_NOT_IMPLEMENTED

0xC0000002

STATUS_INVALID_DEVICE_REQUEST

0xC0000010

STATUS_ILLEGAL_FUNCTION

0xC00000AF

EINVAL

Invalid Function.

ERRbadfile

0x0002

STATUS_NO_SUCH_FILE

0xC000000F

STATUS_NO_SUCH_DEVICE

0xC000000E

STATUS_OBJECT_NAME_NOT_FOUND

0xC0000034

ENOENT

File not found.

ERRbadpath

0x0003

STATUS_OBJECT_PATH_INVALID

0xC0000039

STATUS_OBJECT_PATH_NOT_FOUND

0xC000003A

STATUS_OBJECT_PATH_SYNTAX_BAD

0xC000003B

STATUS_DFS_EXIT_PATH_FOUND

0xC000009B

STATUS_REDIRECTOR_NOT_STARTED

0xC00000FB

ENOENT

A component in the path prefix is not a directory.

ERRnofids

0x0004

STATUS_TOO_MANY_OPENED_FILES

0xC000011F

EMFILE

Too many open files. No FIDs are available.

ERRnoaccess

0x0005

STATUS_ACCESS_DENIED

0xC0000022

STATUS_INVALID_LOCK_SEQUENCE

0xC000001E

STATUS_INVALID_VIEW_SIZE

0xC000001F

STATUS_ALREADY_COMMITTED

0xC0000021

STATUS_PORT_CONNECTION_REFUSED

0xC0000041

STATUS_THREAD_IS_TERMINATING

0xC000004B

STATUS_DELETE_PENDING

0xC0000056

STATUS_PRIVILEGE_NOT_HELD

0xC0000061

STATUS_LOGON_FAILURE

0xC000006D

STATUS_FILE_IS_A_DIRECTORY

0xC00000BA

STATUS_FILE_RENAMED

0xC00000D5

STATUS_PROCESS_IS_TERMINATING

0xC000010A

STATUS_DIRECTORY_NOT_EMPTY

0xC0000101

STATUS_CANNOT_DELETE

0xC0000121

STATUS_FILE_DELETED

0xC0000123

EPERM

Access denied.

ERRbadfid

0x0006

STATUS_SMB_BAD_FID

0x00060001

STATUS_INVALID_HANDLE

0xC0000008

STATUS_OBJECT_TYPE_MISMATCH

0xC0000024

STATUS_PORT_DISCONNECTED

0xC0000037

STATUS_INVALID_PORT_HANDLE

0xC0000042

STATUS_FILE_CLOSED

0xC0000128

STATUS_HANDLE_NOT_CLOSABLE

0xC0000235

EBADF

Invalid FID.

ERRbadmcb

0x0007

Memory Control Blocks were destroyed.

ERRnomem

0x0008

STATUS_SECTION_TOO_BIG

0xC0000040

STATUS_TOO_MANY_PAGING_FILES

0xC0000097

STATUS_INSUFF_SERVER_RESOURCES

0xC0000205

ENOMEM

Insufficient server memory to perform the requested operation.

ERRbadmem

0x0009

EFAULT

The server performed an invalid memory access (invalid address).

ERRbadenv

0x000A

Invalid environment.

ERRbadformat

0x000B

Invalid format.

ERRbadaccess

0x000C

STATUS_OS2_INVALID_ACCESS

0x000C0001

STATUS_ACCESS_DENIED

0xC00000CA

Invalid open mode.

ERRbaddata

0x000D

STATUS_DATA_ERROR

0xC000009C

E2BIG

Bad data. (May be generated by IOCTL calls on the server.)

ERRbaddrive

0x000F

ENXIO

Invalid drive specified.

ERRremcd

0x0010

STATUS_DIRECTORY_NOT_EMPTY

0xC0000101

Remove of directory failed because it was not empty.

ERRdiffdevice

0x0011

STATUS_NOT_SAME_DEVICE

0xC00000D4

EXDEV

A file system operation (such as a rename) across two devices was attempted.

ERRnofiles

0x0012

STATUS_NO_MORE_FILES

0x80000006

No (more) files found following a file search command.

ERRgeneral

0x001F

STATUS_UNSUCCESSFUL

0xC0000001

General error.

ERRbadshare

0x0020

STATUS_SHARING_VIOLATION

0xC0000043

ETXTBSY

Sharing violation. A requested open mode conflicts with the sharing mode of an existing file handle.

ERRlock

0x0021

STATUS_FILE_LOCK_CONFLICT

0xC0000054

STATUS_LOCK_NOT_GRANTED

0xC0000055

EDEADLOCK

A lock request specified an invalid locking mode, or conflicted with an existing file lock.

ERReof

0x0026

STATUS_END_OF_FILE

0xC0000011

EEOF

Attempted to read beyond the end of the file.

ERRunsup

0x0032

STATUS_NOT_SUPPORTED

0XC00000BB

This command is not supported by the server.

ERRfilexists

0x0050

STATUS_OBJECT_NAME_COLLISION

0xC0000035

EEXIST

An attempt to create a file or directory failed because an object with the same pathname already exists.

ERRinvalidparam

0x0057

STATUS_INVALID_PARAMETER

0xC000000D

A parameter supplied with the message is invalid.

ERRunknownlevel

0x007C

STATUS_OS2_INVALID_LEVEL

0x007C0001

Invalid information level.

ERRinvalidseek

0x0083

STATUS_OS2_NEGATIVE_SEEK

0x00830001

An attempt was made to seek to a negative absolute offset within a file.

ERROR_NOT_LOCKED

0x009E

STATUS_RANGE_NOT_LOCKED

0xC000007E

The byte range specified in an unlock request was not locked.

ERROR_NO_MORE_SEARCH_HANDLES

0x0071

STATUS_OS2_NO_MORE_SIDS

0x00710001

Maximum number of searches has been exhausted.

ERROR_CANCEL_VIOLATION

0x00AD

STATUS_OS2_CANCEL_VIOLATION

0x00AD0001

No lock request was outstanding for the supplied cancel region.

ERROR_ATOMIC_LOCKS_NOT_SUPPORTED

0x00AE

STATUS_OS2_ATOMIC_LOCKS_NOT_SUPPORTED

0x00AE0001

The file system does not support atomic changes to the lock type.

ERRbadpipe

0x00E6

STATUS_INVALID_INFO_CLASS

0xC0000003

STATUS_INVALID_PIPE_STATE

0xC00000AD

STATUS_INVALID_READ_MODE

0xC00000B4

Invalid named pipe.

ERROR_CANNOT_COPY

0x010A

STATUS_OS2_CANNOT_COPY

0x010A0001

The copy functions cannot be used.

ERRpipebusy

0x00E7

STATUS_INSTANCE_NOT_AVAILABLE

0xC00000AB

STATUS_PIPE_NOT_AVAILABLE

0xC00000AC

STATUS_PIPE_BUSY

0xC00000AE

All instances of the designated named pipe are busy.

ERRpipeclosing

0x00E8

STATUS_PIPE_CLOSING

0xC00000B1

STATUS_PIPE_EMPTY

0xC00000D9

The designated named pipe is in the process of being closed.

ERRnotconnected

0x00E9

STATUS_PIPE_DISCONNECTED

0xC00000B0

The designated named pipe exists, but there is no server process listening on the server side.

ERRmoredata

0x00EA

STATUS_BUFFER_OVERFLOW

0x80000005

STATUS_MORE_PROCESSING_REQUIRED

0xC0000016

There is more data available to read on the designated named pipe.

ERRbadealist

0x00FF

Inconsistent extended attribute list.

ERROR_EAS_

DIDNT_FIT

0x0113

STATUS_EA_TOO_LARGE

0xC0000050

STATUS_OS2_EAS_DIDNT_FIT

0x01130001

Either there are no extended attributes, or the available extended attributes did not fit into the response.

ERROR_EAS_

NOT_SUPPORTED

0x011A

STATUS_EAS_NOT_SUPPORTED

0xC000004F

The server file system does not support Extended Attributes.

ERROR_EA_ACCESS_DENIED

0x03E2

STATUS_OS2_EA_ACCESS_DENIED

0x03E20001

Access to the extended attribute was denied.

ERR_NOTIFY_ENUM_DIR

0x03FE

STATUS_NOTIFY_ENUM_DIR

0x0000010C

More changes have occurred within the directory than will fit within the specified Change Notify response buffer.

ERRSRV Class 0x02

Error code

NTSTATUS values

POSIX equivalent

Description

ERRerror

0x0001

STATUS_INVALID_SMB

0x00010002

Unspecified server error.<23>

ERRbadpw

0x0002

STATUS_WRONG_PASSWORD

0xC000006A

Invalid password.

ERRbadpath

0x0003

STATUS_PATH_NOT_COVERED

0xC0000257

DFS pathname not on local server.

ERRaccess

0x0004

STATUS_NETWORK_ACCESS_DENIED

0xC00000CA

EACCES

Access denied. The specified UID does not have permission to execute the requested command within the current context (TID).

ERRinvtid

0x0005

STATUS_NETWORK_NAME_DELETED

0xC00000C9

STATUS_SMB_BAD_TID

0x00050002

The TID specified in the command was invalid.

Earlier documentation, with the exception of [SNIA], refers to this error code as ERRinvnid (Invalid Network Path Identifier). [SNIA] uses both names.<24>

ERRinvnetname

0x0006

STATUS_BAD_NETWORK_NAME

0xC00000CC

Invalid server name in Tree Connect.

ERRinvdevice

0x0007

STATUS_BAD_DEVICE_TYPE

0xC00000CB

A printer request was made to a non-printer device or, conversely, a non-printer request was made to a printer device.

ERRinvsess

0x0010

Invalid Connection ID (CID). This error code is only defined when the Direct IPX connectionless transport is in use.

ERRworking

0x0011

A command with matching MID or SequenceNumber is currently being processed. This error code is defined only when the Direct IPX connectionless transport is in use.

ERRnotme

0x0012

Incorrect NetBIOS Called Name when starting an SMB session over Direct IPX. This error code is only defined when the Direct IPX connectionless transport is in use.

ERRbadcmd

0x0016

STATUS_SMB_BAD_COMMAND

0x00160002

An unknown SMB command code was received by the server.

ERRqfull

0x0031

STATUS_PRINT_QUEUE_FULL

0xC00000C6

Print queue is full - too many queued items.

ERRqtoobig

0x0032

STATUS_NO_SPOOL_SPACE

0xC00000C7

Print queue is full - no space for queued item, or queued item too big.

ERRqeof

0x0033

End Of File on print queue dump.

ERRinvpfid

0x0034

STATUS_PRINT_CANCELLED

0xC00000C8

Invalid FID for print file.

ERRsmbcmd

0x0040

STATUS_NOT_IMPLEMENTED

0xC0000002

Unrecognized SMB command code.

ERRsrverror

0x0041

STATUS_UNEXPECTED_NETWORK_ERROR

0xC00000C4

Internal server error.

ERRfilespecs

0x0043

The FID and pathname contain incompatible values.

ERRbadpermits

0x0045

STATUS_NETWORK_ACCESS_DENIED

0xC00000CA

An invalid combination of access permissions for a file or directory was presented. The server cannot set the requested attributes.

ERRsetattrmode

0x0047

The attribute mode presented in a set mode request was invalid.

ERRtimeout

0x0058

STATUS_UNEXPECTED_NETWORK_ERROR

0xC00000C4

STATUS_IO_TIMEOUT

0xC00000B5

Operation timed out.

ERRnoresource

0x0059

STATUS_REQUEST_NOT_ACCEPTED

0xC00000D0

No resources currently available for this SMB request.

ERRtoomanyuids

0x005A

STATUS_TOO_MANY_SESSIONS

0xC00000CE

Too many UIDs active for this SMB connection.

ERRbaduid

0x005B

STATUS_SMB_BAD_UID

0x005B0002

The UID specified is not known as a valid ID on this server session.

ERRnotconnected

0x00E9

STATUS_PIPE_DISCONNECTED

0xC00000B0

EPIPE

Write to a named pipe with no reader.

ERRusempx

0x00FA

STATUS_SMB_USE_MPX

0x00FA0002

Temporarily unable to support RAW mode transfers. Use MPX mode.

ERRusestd

0x00FB

STATUS_SMB_USE_STANDARD

0x00FB0002

Temporarily unable to support RAW or MPX mode transfers. Use standard read/write.

ERRcontmpx

0x00FC

STATUS_SMB_CONTINUE_MPX

0x00FC0002

Continue in MPX mode.

This error code is reserved for future use.

ERRaccountExpired

0x08BF

STATUS_ACCOUNT_DISABLED

0xC0000072

STATUS_ACCOUNT_EXPIRED

0xC0000193

User account on the target machine is disabled or has expired.

ERRbadClient

0x08C0

STATUS_INVALID_WORKSTATION

0xC0000070

The client does not have permission to access this server.

ERRbadLogonTime

0x08C1

STATUS_INVALID_LOGON_HOURS

0xC000006F

Access to the server is not permitted at this time.

ERRpasswordExpired

0x08C2

STATUS_PASSWORD_EXPIRED

0xC0000071

STATUS_PASSWORD_MUST_CHANGE

0xC0000224

The user's password has expired.

ERRnosupport

0xFFFF

STATUS_SMB_NO_SUPPORT

0XFFFF0002

Function not supported by the server.

ERRHRD Class 0x03

Error code

NTSTATUS values

POSIX equivalent

Description

ERRnowrite

0x0013

STATUS_MEDIA_WRITE_PROTECTED

0xC00000A2

EROFS

Attempt to modify a read-only file system.

ERRbadunit

0x0014

ENODEV

Unknown unit.

ERRnotready

0x0015

STATUS_NO_MEDIA_IN_DEVICE

0xC0000013

EUCLEAN

Drive not ready.

ERRbadcmd

0x0016

STATUS_INVALID_DEVICE_STATE

0xC0000184

Unknown command.

ERRdata

0x0017

STATUS_DATA_ERROR

0xC000003E

STATUS_CRC_ERROR

0xC000003F

EIO

Data error (incorrect CRC).

ERRbadreq

0x0018

STATUS_DATA_ERROR

0xC000003E

ERANGE

Bad request structure length.

ERRseek

0x0019

Seek error.

ERRbadmedia

0x001A

STATUS_DISK_CORRUPT_ERROR

0xC0000032

Unknown media type.

ERRbadsector

0x001B

STATUS_NONEXISTENT_SECTOR

0xC0000015

Sector not found.

ERRnopaper

0x001C

STATUS_DEVICE_PAPER_EMPTY

0x8000000E

Printer out of paper.

ERRwrite

0x001D

Write fault.

ERRread

0x001E

Read fault.

ERRgeneral

0x001F

General hardware failure.

ERRbadshare

0x0020

STATUS_SHARING_VIOLATION

0xC0000043

ETXTBSY

An attempted open operation conflicts with an existing open.

ERRlock

0x0021

STATUS_FILE_LOCK_CONFLICT

0xC0000054

EDEADLOCK

A lock request specified an invalid locking mode, or conflicted with an existing file lock.

ERRwrongdisk

0x0022

STATUS_WRONG_VOLUME

0xC0000012

The wrong disk was found in a drive.

ERRFCBUnavail

0x0023

No server-side File Control Blocks are available to process the request.

ERRsharebufexc

0x0024

A sharing buffer has been exceeded.

ERRdiskfull

0x0027

STATUS_DISK_FULL

0xC000007F

ENOSPC

No space on file system.

ERRCMD Class 0xFF

The ERRCMD error class is used to indicate that the server received a command that was not in the SMB format. No error codes are defined for use with the ERRCMD (0XFF) class.<25>