Error: "A subdirectory or file already exists" when trying to create a directory path.

(Last modified: 28Jul2003)

This document (10083958) is provided subject to the disclaimer at the end of this document.

fact

Novell NetWare 6.0

Novell Native File Access Protocols

Novell Native File Access Pack

Novell Native File Access for Windows

CIFS.NLM version 1.30 May 12, 2003

Windows NT Workstation 4.0

symptom

Error: "A subdirectory or file already exists" when trying to create a directory path.

cause

If one tries to create a directory path on a share served by a NetWare file server with Native File Access for Windows, using for example the MD (make directory) command at a Microsoft Windows workstation with the Client for Microsoft Networks, the error message "File already exists" or "A subdirectory or file already exists" is returned and the directory path is not created.

One can successfully create a directory path on the local hard disk, on a Microsoft Windows file server or when using the Novell Client to access the NetWare file server.

In fact, no file system allows creation of a subdirectory if a parent directory does not exist already.

When a NetWare NCP server receives NCP request 87, subfunction 1 to create a subdirectory and a directory component in the path to the subdirectory to be created does not exist, the NetWare NCP server returns the Completion Code 0x9C (ERR_INVALID_PATH).
When a Windows 2000 file server receives an SMB_COM_CREATE_DIRECTORY request to create a subdirectory and a directory component in the path to the subdirectory to be created does not exist, the Windows 2000 file server returns the 32-bit NT Status Code 0xC000003A (STATUS_OBJECT_PATH_INVALID).
When a NetWare CIFS server receives an SMB_COM_CREATE_DIRECTORY request to create a subdirectory and a directory component in the path to the subdirectrory to be created does not exist, the NetWare CIFS server returns the DOS error 0x50 (ERROR_FILE_EXISTS).

If the NCP error ERR_INVALID_PATH or NT Status STATUS_OBJECT_PATH_INVALID is returned, then the MD command will try to create each directory component in the path to the subdirectory separately.

If the DOS error ERROR_FILE_EXISTS is returned, then the MD command will simply display the error "A subdirectory or file already exists" and the directrory path does not get created.

fix

Fixed with CIFS.NLM version 1.30 of June 18, 2003 (size = 356,638 bytes). You can obtain the fix with Novell Technical Services.

The NT Status Code STATUS_OBJECT_PATH_INVALID maps to the DOS error 0x03 (ERROR_BAD_PATHNAME). The new NetWare CIFS server returns the DOS error 0x03 instead of 0x50 in case a directory component in a path in any type of SMB message could not be found, unless the missing directory is the last directory component in a request to create a directory.

Work-around: Create each directory in the path separately, starting with the directory that is closest to the root of the share.

document

Document Title: Error: "A subdirectory or file already exists" when trying to create a directory path.
Document ID: 10083958
Solution ID: NOVL89994
Creation Date: 06Jun2003
Modified Date: 28Jul2003
Novell Product Class:NetWare

disclaimer

The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.