CIFS Error Codes and Classes

Error classes and codes are returned by the server to the client in the packet header.

Error class Description
SUCCESS
0x00
The client 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 table lists ERRDOS error class codes.

Code Description
ERRbadfunc
1
Invalid function.
The server did not recognize or could not perform a system call generated by the server; for example, set the DIRECTORY attribute on a data file, invalid seek mode.
ERRbadfile
2
File not found.
The last component of a file's path name could not be found.
ERRbadpath
3
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 (for example, 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.

The following table lists ERRSRV error class codes.

Code Description
ERRerror
1
Non-specific error: resource other than disk space exhausted (for example, TIDs); or first command was not negotiate; or multiple negotiates attempted; or internal server error.
ERRbadpw
2
Bad password/name; or 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.
ERRinvnid
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.
ERRqtoobig50
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; for example, system file unavailable.
ERRfilespecs
67
The FID and path name parameters contained an invalid combination of values.
ERRbadpermits
69
The access permissions specified for a file or directory are not a valid combination. The server cannot set the requested attribute.
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.
ERRnosupport
65535
Function not supported.

The following table lists ERRHRD error class codes.

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
An 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.

See Also

Royalty-Free CIFS Technical Reference License Agreement