Implementing CIFS: The Common Internet File System

This section lists all of the valid values for Status.DosError.ErrorClass, and most of the error codes for Status.DosError.Error. Additionally, a mapping between STATUS codes and DOS errors are provided.

The following error classes may be returned by the server to the client.

Class Code Comment ======= ===== ======== SUCCESS 0 The request was successful. ERRDOS 0x01 Error is from the core DOS operating system set. ERRSRV 0x02 Error is generated by the server network file manager. ERRHRD 0x03 Error is a hardware error. ERRCMD 0xFF Command was not in the "SMB" format.

The following error codes may be generated with the SUCCESS error class.

Class Code Comment ======= ===== ======== SUCCESS 0 The request was successful.

The following error codes may be generated with the ERRDOS error class.

Error Code Description ====== ===== ============ ERRbadfunc 1 Invalid function. The server did not recognize or could not perform a system call generated by the server, e.g., set the DIRECTORY attribute on a data file, invalid seek mode. ERRbadfile 2 File not found. The last component of a file's pathname could not be found. ERRbadpath Directory invalid. A directory component in a pathname could not be found. ERRnofids 4 Too many open files. The server has no file handles available. ERRnoaccess 5 Access denied, the client's context does not permit the requested function. This includes the following conditions: invalid rename command, write to Fid open for read only, read on Fid open for write only, attempt to delete a non-empty directory ERRbadfid 6 Invalid file handle. The file handle specified was not recognized by the server. ERRbadmcb 7 Memory control blocks destroyed. ERRnomem 8 Insufficient server memory to perform the requested function. ERRbadmem 9 Invalid memory block address. ERRbadenv 10 Invalid environment. ERRbadformat 11 Invalid format. ERRbadaccess 12 Invalid open mode. ERRbaddata 13 Invalid data (generated only by IOCTL calls within the server). ERRbaddrive 15 Invalid drive specified. ERRremcd 16 A Delete Directory request attempted to remove the server's current directory. ERRdiffdevice 17 Not same device (e.g., a cross volume rename was attempted) ERRnofiles 18 A File Search command can find no more files matching the specified criteria. ERRbadshare 32 The sharing mode specified for an Open conflicts with existing FIDs on the file. ERRlock 33 A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process. ERRfilexists 80 The file named in the request already exists. ErrQuota 512 The operation would cause a quota limit to be exceeded. ErrNotALink 513 A link operation was performed on a pathname that was not a link.

The following error codes may be generated with the ERRSRV error class.

Error Code Description ====== ===== ============ ERRerror 1 Non-specific error code. It is returned under the following conditions: resource other than disk space exhausted (e.g. TIDs), first SMB command was not negotiate, multiple negotiates attempted, and internal server error. ERRbadpw 2 Bad password - name/password pair in a Tree Connect or Session Setup are invalid. ERRaccess 4 The client does not have the necessary access rights within the specified context for the requested function. ERRinvtid 5 The Tid specified in a command was invalid. ERRinvnetname 6 Invalid network name in tree connect. ERRinvdevice 7 Invalid device - printer request made to non-printer connection or non-printer request made to printer connection. ERRqfull 49 Print queue full (files) -- returned by open print file. ERRqtoobig 50 Print queue full -- no space. ERRqeof 51 EOF on print queue dump. ERRinvpfid 52 Invalid print file FID. ERRsmbcmd 64 The server did not recognize the command received. ERRsrverror 65 The server encountered an internal error, e.g., system file unavailable. ERRbadBID 66 (obsolete) ERRfilespecs 67 The Fid and pathname parameters contained an invalid combination of values. ERRbadLink 68 (obsolete) ERRbadpermits 69 The access permissions specified for a file or directory are not a valid combination. The server cannot set the requested attribute. ERRbadPID 70 ERRsetattrmode 71 The attribute mode in the Set File Attribute request is invalid. ERRpaused 81 Server is paused. (Reserved for messaging) ERRmsgoff 82 Not receiving messages. (Reserved for messaging) ERRnoroom 83 No room to buffer message.(Reserved for messaging) ERRrmuns 87 Too many remote user names.(Reserved for messaging) ERRtimeout 88 Operation timed out. ERRnoresource 89 No resources currently available for request. ERRtoomanyuids 90 Too many Uids active on this session. ERRbaduid 91 The Uid is not known as a valid user identifier on this session. ERRusempx 250 Temporarily unable to support Raw, use MPX mode. ERRusestd 251 Temporarily unable to support Raw, use standard read/write. ERRcontmpx 252 Continue in MPX mode. ERRbadPassword 254 (obsolete) ERR_NOTIFY_ENUM_DIR 1024 Too many files have changed since the last time a NT_TRANSACT_NOTIFY_CHANGE was issued ERRaccountExpired 2239 ERRbadClient 2240 Cannot access the server from this workstation. ERRbadLogonTime 2241 Cannot access the server at this time. ERRpasswordExpired 2242 ERRnosupport 65535 Function not supported.

The following error codes may be generated with the ERRHRD error class.

Error Code Description ====== === ============ ERRnowrite 19 Attempt to write on write-protected media ERRbadunit 20 Unknown unit. ERRnotready 21 Drive not ready. ERRbadcmd 22 Unknown command. ERRdata 23 Data error (CRC). ERRbadreq 24 Bad request structure length. ERRseek 25 Seek error. ERRbadmedia 26 Unknown media type. ERRbadsector 27 Sector not found. ERRnopaper 28 Printer out of paper. ERRwrite 29 Write fault. ERRread 30 Read fault. ERRgeneral 31 General failure. ERRbadshare 32 A open conflicts with an existing open. ERRlock 33 A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process. ERRwrongdisk 34 The wrong disk was found in a drive. ERRFCBUnavail 35 No FCBs are available to process request. ERRsharebufexc 36 A sharing buffer has been exceeded.

These are the mappings of the listed STATUS_codes to the DOS errors.

DOS Error

Status Code

=========

===========

ERROR_INVALID_FUNCTION

STATUS_NOT_IMPLEMENTED

ERROR_FILE_NOT_FOUND

STATUS_NO_SUCH FILE_

ERROR_PATH_NOT_FOUND

STATUS_OBJECT_PATH_NOT_FOUND

ERROR_TOO_MANY_OPEN_FILES

STATUS_TOO_MANY_OPENED_FILES

ERROR_ACCESS_DENIED

STATUS_ACCESS_DENIED

ERROR_INVALID_HANDLE

STATUS_INVALID_HANDLE

ERROR_NOT_ENOUGH_MEMORY

STATUS_INSUFFICIENT_RESOURCES

ERROR_INVALID_ACCESS

STATUS_ACCESS_DENIED

ERROR_INVALID_DATA

STATUS_DATA_ERROR

ERROR_CURRENT_DIRECTORY

STATUS_DIRECTORY_NOT_EMPTY

ERROR_NOT_SAME_DEVICE

STATUS_NOT_SAME_DEVICE

ERROR_NO_MORE_FILES

STATUS_NO_MORE_FILES

ERROR_WRITE_PROTECT

STATUS_MEDIA_WRITE_PROTECTED

ERROR_NOT_READY

STATUS_DEVICE_NOT_READY

ERROR_CRC

STATUS_CRC_ERROR

ERROR_BAD_LENGTH

STATUS_DATA_ERROR

ERROR_NOT_DOS_DISK

STATUS_DISK_CORRUPT_ERROR

ERROR_SECTOR_NOT_FOUND

STATUS_NONEXISTENT_SECTOR

ERROR_OUT_OF_PAPER

STATUS_DEVICE_PAPER_EMPTY

ERROR_SHARING_VIOLATION

STATUS_SHARING_VIOLATION

ERROR_LOCK_VIOLATION

STATUS_FILE_LOCK_CONFLICT

ERROR_WRONG_DISK

STATUS_WRONG_VOLUME

ERROR_NOT_SUPPORTED

STATUS_NOT_SUPPORTED

ERROR_REM_NOT_LIST

STATUS_REMOTE_NOT_LISTENING

ERROR_DUP_NAME

STATUS_DUPLICATE_NAME

ERROR_BAD_NETPATH

STATUS_BAD_NETWORK_PATH

ERROR_NETWORK_BUSY

STATUS_NETWORK_BUSY

ERROR_DEV_NOT_EXIST

STATUS_DEVICE_DOES_NOT_EXIST

ERROR_TOO_MANY_CMDS

STATUS_TOO_MANY_COMMANDS

ERROR_ADAP_HDW_ERR

STATUS_ADAPTER_HARDWARE_ERROR

ERROR_BAD_NET_RESP

STATUS_INVALID_NETWORK_RESPONSE

ERROR_UNEXP_NET_ERR

STATUS_UNEXPECTED_NETWORK_ERROR

ERROR_BAD_REM_ADAP

STATUS_BAD_REMOTE_ADAPTER

ERROR_PRINTQ_FULL

STATUS_PRINT_QUEUE_FULL

ERROR_NO_SPOOL_SPACE

STATUS_NO_SPOOL_SPACE

ERROR_PRINT_CANCELLED

STATUS_PRINT_CANCELLED

ERROR_NETNAME_DELETED

STATUS_NETWORK_NAME_DELETED

ERROR_NETWORK_ACCESS_DENIED

STATUS_NETWORK_ACCESS_DENIED

ERROR_BAD_DEV_TYPE

STATUS_BAD_DEVICE_TYPE

ERROR_BAD_NET_NAME

STATUS_BAD_NETWORK_NAME

ERROR_TOO_MANY_NAMES

STATUS_TOO_MANY_NAMES

ERROR_TOO_MANY_SESS

STATUS_TOO_MANY_SESSIONS

ERROR_SHARING_PAUSED

STATUS_SHARING_PAUSED

ERROR_REQ_NOT_ACCEP

STATUS_REQUEST_NOT_ACCEPTED

ERROR_REDIR_PAUSED

STATUS_REDIRECTOR_PAUSED

ERROR_FILE_EXISTS

STATUS_OBJECT_NAME_COLLISION

ERROR_INVALID_PASSWORD

STATUS_WRONG_PASSWORD

ERROR_INVALID_PARAMETER

STATUS_INVALID_PARAMETER

ERROR_NET_WRITE_FAULT

STATUS_NET_WRITE_FAULT

ERROR_BROKEN_PIPE

STATUS_PIPE_BROKEN

ERROR_OPEN_FAILED

STATUS_OPEN_FAILED

ERROR_BUFFER_OVERFLOW

STATUS_BUFFER_OVERFLOW

ERROR_DISK_FULL

STATUS_DISK_FULL

ERROR_SEM_TIMEOUT

STATUS_IO_TIMEOUT

ERROR_INSUFFICIENT_BUFFER

STATUS_BUFFER_TOO_SMALL

ERROR_INVALID_NAME

STATUS_OBJECT_NAME_INVALID

ERROR_INVALID_LEVEL

STATUS_INVALID_LEVEL

ERROR_BAD_PATHNAME

STATUS_OBJECT_PATH_INVALID

ERROR_BAD_PIPE

STATUS_INVALID_PARAMETER

ERROR_PIPE_BUSY

STATUS_PIPE_NOT_AVAILABLE

ERROR_NO_DATA

STATUS_PIPE_EMPTY

ERROR_PIPE_NOT_CONNECTED

STATUS_PIPE_DISCONNECTED

ERROR_MORE_DATA

STATUS_BUFFER_OVERFLOW

ERROR_VC_DISCONNECTED

STATUS_VIRTUAL_CIRCUIT_CLOSED

ERROR_INVALID_EA_NAME

STATUS_INVALID_EA_NAME

ERROR_EA_LIST_INCONSISTENT

STATUS_EA_LIST_INCONSISTENT

ERROR_EAS_DIDNT_FIT

STATUS_EA_TOO_LARGE

ERROR_EA_FILE_CORRUPT

STATUS_EA_CORRUPT_ERROR

ERROR_EA_TABLE_FULL

STATUS_EA_CORRUPT_ERROR

ERROR_INVALID_EA_HANDLE

STATUS_EA_CORRUPT_ERROR

Категории