TECHNICAL INFORMATION DOCUMENT TITLE: TF2128 - DOS Name Space and NUCFS Locking DATE: 27OCT95 README FOR: TF2128 PRODUCT and VERSION: UnixWare 2.01 Installation Instructions: DATATYPE: datastream 1. Download the tf2128.Z and tf2128.txt files to the /tmp directory on your machine. 2. Read the release notes contained in this file and follow the instuctions to add the package to your system. 3. Now become root, uncompress the file and add the package to your system using the following commands: $ su # uncompress /tmp/tf2128.Z # pkgadd -d /tmp/tf2128 ENGINEERING RELEASE NOTES ------------------------- Title ----- PTF2128 - DOS Name Space Support and NUCFS Locking Patch Product And Version ------------------- UnixWare 2.02, UnixWare 2.03 Abstract -------- This PTF corrects problems with mandatory file locking in the nucfs file system and, for UnixWare 2.02 systems, provides DOS Name Space support. Symptom -------- When using mandatory file and record locking, a write operation that cannot complete immediately due to encountering a lock on the file will return indicating a failure rather than blocking until the operation can be completed successfully. On UnixWare 2.02 systems, cannot mount NetWare volumes without both NUC.NLM and the NFS (Unix) Name Space. SOLUTION SPECIFICS ------------------ General Description. ------------------- This PTF installs updated drivers which support the DOS name space and contain changes so that mandatory file locking of nucfs-mounted files operates as it does for other file systems. New Features. ------------ The DOS Name Space (or DOS Access Mode) is now supported. This feature enables limited access by UnixWare systems, via the NetWare Unix Client (NUC), to NetWare volumes when the NUC.NLM is not running on the NetWare server and/or the volume has not been configured with the NFS (Unix) Name Space. Software Notes and Recommendations. ---------------------------------- This PTF should be installed on all UnixWare 2.02 or 2.03 systems which have the NetWare UNIX Client (nuc) package installed. Testing of the modified software contained in this package has been conducted only to the extent necessary to confirm that it resolves the problem(s) stated above ("Symptom"). Such testing consists of recreating the problem conditions and verifying that the problem no longer occurs. No other testing of this software has been done. Hardware Notes and Recommendations. ---------------------------------- This PTF is targeted for the i386, i486 and Pentium CPU's. Additional Information ---------------------- Using DOS Name Space Volumes ---------------------------- Accessing NetWare Volumes from UnixWare When you access files that reside on a NetWare server (i.e., files under the /.NetWare/server-name directories; the same files accessed through the Desktop's NetWare icon), the NetWare Unix Client (NUC) manages your interaction with the NetWare server. For example, if you try to read a file on a NetWare server (using, say, a Desktop application), it is the NUC that sends your request to open (read) the file to the NetWare server. The NUC then waits as the NetWare server determines whether your NetWare login ID (the one you used to authenticate to the server) can read the file. The NetWare server then responds to the request from the NUC. The NUC tells you the results of the request, which in the case of reading a file results in either the file being opened by the application or an error message. Operations Supported on NetWare Volumes The actual operations (creating, reading, writing, copying, etc.) allowed on NetWare files you access from UnixWare depends on the access mode of the volume. The DOS name space access mode provides users and applications on UnixWare with simple DOS-style access to files located on a NetWare volume with no additional name space support. The NUC allows you to use UnixWare file manipulation commands on a NetWare server volume that supports only the DOS name space. However, only minimal file operations can be performed on a DOS name space volume. DOS name space access requires little administration on the NetWare server and has minimal performance impact on the NetWare server and on UnixWare. See "Configuring a NetWare Volume in DOS Mode". Mounting DOS Name Space Volumes DOS name space NetWare volumes are mounted in the same way as any NetWare volumes: - by the automounter, when you use the GUI to login to a NetWare server or when you attempt to use the cd command to change directory to a NetWare volume - by an explicit mount command Most of the time, NetWare volumes will be mounted transparently by the automounter. Once you authenticate yourself to the NetWare server, all available volumes on the server are made accessible to you as appropriate, including those running in DOS mode. What Access Mode is a Volume Using? The operations you can perform and the file information that you see on a NetWare volume depends on the access mode supported for the volume. If the NFS (Unix) name space has not been configured on the volume and/or the NUC.NLM is not loaded, the DOS access mode will be in effect. Since these are configuration options chosen by the NetWare administrator, the easiest way to determine the options in effect is to ask the NetWare Administrator. Alternatively, if you have access to the NetWare console (or can access it remotely from UnixWare via XCONSOLE) you can determine the running modes of mounted volumes by examining the output of the NetWare console VOLUMES command and the contents of the SYS:SYSTEM\UNISTART.NCF file. Finally, if you do not have access to the NetWare console (directly or remotely from UnixWare), you can use the following tests to determine the access mode in which a particular NetWare volume is operating: 1. Open a NetWare server volume using either the command line or the Desktop. 2. From the command line, examine the output of ls -l on the root of the volume and on various subdirectories. From the Desktop, use the Format=>Long menu command to display a long listing of the volume and its subdirectories. 3. The following clues will help you determine the volume's mode: 3a. DOS Mode: If your login and group IDs are the only valid ones listed and the group and other permissions are ALWAYS unused, then the volume is in DOS mode. 3b. NetWare Mode: If your login and group IDs are the only valid ones listed, the group and other permissions are sometimes used, and you cannot use the chmod, chown, or chgrp commands, the volume is in NetWare mode. 3c. Unix Mode: If you see other valid UnixWare user names and groups (other than your own) in the listing, the volume is in Unix mode. What Can I Do on a DOS Volume? The following table tells you what file operations are supported on NetWare volumes mounted in DOS mode only. The explanations given in the table apply to any method used to perform the given operation on the NetWare volume (e.g., using Desktop commands; drag- and-drop; a UnixWare application, such as an editor, word processor, or spreadsheet; and, any of the common shell commands for file manipulation, such as cp, mv, and cat). Specific commands are mentioned in the explanations where appropriate for clarity. Table 1-1 File Operation Listing To list all the files and folders under a folder, you must have both read (r) and execute (x) permissions on the folder. If you do not have read and execute permissions on a folder, you will still be able to see any files in the folder for which you have the NetWare File Scan (F) right. Unfortunately, this right is translated for presentation on the UnixWare side for folders only. Reading To read (open) an existing file, you must have read (r) permission on the file. Writing To write (append) to an existing file, you must have write (w) permission on the file. Creating To create a new file or folder, you must have write (w) permission on the folder in which you want to create the file or folder. The new file or folder name must follow the conventions given in "DOS Mode File Name Restrictions". Copying To copy a file, you must have: - read (r) permission on the file - read and execute (r-x) permissions on the file's parent folder - write (w) permission on the folder to which you want to copy the file To copy a folder, you must have: - read and execute (r-x) permissions on the folder (any files in the folder on which you have read (r) permission are copied with the folder to the new location) - read and execute (r-x) permissions on the folder's parent folder - write (w) permission on the folder to which you want to copy the folder - if there are any folders under the folder to be copied, these same requirements apply to those folders and the files in them Moving To move a file or folder, you must have read, write, and execute (rwx) permissions on the file or folder, and write (w) permission on the target folder. Renaming To rename a file or folder, you must have the Modify (M) NetWare right on the file or folder; see "Ownership on DOS Mode Volumes". The new name must follow the conventions given in "DOS Mode File Name Restrictions". Deleting To delete a file or folder, you must have the write (w) permission on the parent folder of the file or folder to be deleted. Linking Linking files and folders is not supported. Applications, the Desktop, and the ln command return an error message if you try to use them to link a file or folder. Changing Permissions The read and write (rw-) permissions on a file cannot be altered; however, you can add and remove the execute (x) permission on a file. To do so, you must have the NetWare Access Control (A) right on the file; see "Ownership on DOS Mode Volumes". Folder permissions cannot be changed at all. Changing Time Stamp To change the time stamp on a file or folder (using an application, the Desktop, or the touch command), you must have the NetWare Access Control (A) right on the file; see "Ownership on DOS Mode Volumes". Changing Ownership Changing file and folder ownership is not supported. Applications, the Desktop, and the chown and chgrp commands return an error message if you try to use them to change the ownership of a file or folder. DOS Mode File Name Restrictions A NetWare volume in DOS mode imposes the following restrictions on the names you give to files and directories on the volume: - Names consist of a maximum of 8 characters, optionally followed by a period and up to 3 characters (this is often called an 8.3 filename format). - Names cannot contain any of the characters that have special meaning to DOS (that is, the characters * / [ ] : | < > + = ; " are not allowed). [Note: NetWare 3.12 servers will allow you to create filenames containing the " character.] - DOS mode does not differentiate between lowercase and uppercase characters (that is, the file names abc.doc, ABC.doc, and ABC.DOC refer to the same file). If you try to create or rename a file using a name that violates the above restrictions, UnixWare displays an appropriate error message and the file is not created or renamed. Rights-to-Permissions Mapping on DOS Mode Volumes The following table shows how rights and permissions are mapped by the NUC for files and folders on NetWare DOS mode volumes. NetWare uses an inherited rights mechanism to grant and deny access. When you attempt to access a NetWare file or folder, NetWare determines your effective rights on the object. How these rights are translated into UnixWare-style permissions depends on whether the object is a file or a folder. Table 1-2 NetWare Effective UnixWare Rights Permissions UnixWare Folders [------F-] r-x [--WCEM--] -w- UnixWare Files [-R------] r-- [--W-----] -w- No other NetWare rights and file attributes are translated for presentation on the UnixWare side by the NUC, though they still play a role in determining what you can do with files and folders on the NetWare volume. For example, even though your effective rights on a file allow you to Write to the file, if the Read-Only attribute is set on the file, then you will not be able to write to the file until this attribute is removed. See your NetWare documentation for more information on Rights and File Attributes. Ownership on DOS Mode Volumes When you use the Desktop or the ls command to look at the ownership of a file or folder on a DOS Mode NetWare volume, your UnixWare login ID will always be shown as the "owner" of the file. However, this does not necessarily mean that you can change the file's name, permissions, or time stamp (operations restricted to the owner of a file on UnixWare). It depends on NetWare rights assigned to the file or folder on the NetWare volume that are not translated for presentation to UnixWare applications, the desktop, or command line utilities. UnixWare's access controls restrict changing a file's name, permissions, or time stamp to the login ID listed as the owner of the file by the Desktop or the ls command. In NetWare, whether you can perform these operations depends not on whether you are considered the NetWare owner of the file, but rather on your effective rights on the file. Specifically, it depends on whether you have the Access Control or Modify efective rights. Access Control and Modify NetWare Rights You need the NetWare Modify right on a file or folder to change its name. You need the NetWare Access Control right on a file or folder to change its permissions or time stamp. For DOS mode NetWare volumes, these rights are not translated into UnixWare permissions, nor do they affect the presentation of ownership on the UnixWare side. How to Tell If You Own a File in DOS Mode Therefore, there is no way for a UnixWare user to tell if they can change the name, permissions, or time stamp of a particular file or folder on a NetWare volume from UnixWare, except by trying the operation. If your NetWare login ID does not have the appropriate effective rights on the file or folder, then an error message tells you that you are not privileged to perform the given operation. Configuring a NetWare Volume in DOS Mode When accessing a NetWare volume, the NUC looks to see which name spaces the volume supports. It first looks for the NFS (UNIX) name space, and uses it if it finds it. If NFS is not present, however, the NUC will use the DOS name space (the default name space for NetWare volumes). Other name space support may be added on the volume, but the UnixWare NUC does not use them and ignores them. To configure a NetWare volume to be accessible to UnixWare users in DOS mode only, you need to remove the NFS name space (if it exists) from the volume, as shown in the procedure below. This procedure uses the VREPAIR NetWare utility to remove the NFS name space from a NetWare volume. VREPAIR is fully explained in the NetWare System Administration documentation. Be sure that no other NetWare users depend on the NFS name space (or any other name space) before you remove the name space from the volume. Any information kept privately by the name space module will be lost once the name space is removed. 1. Get access to the NetWare console. You can do this directly on the dedicated NetWare console, or from UnixWare using the XCONSOLE application. See "Using the NetWare Console from UnixWare" for more information on using XCONSOLE. 2. Determine the name spaces loaded for the server's volumes. To do this, enter: VOLUMES at the NetWare server console prompt. The system displays a list of mounted server volumes and the name spaces supported, as in this example: Mounted Volumes Name Spaces SYS DOS DOC DOS, NFS MAC DOS, MAC, NFS If you wanted, for example, to make the DOC volume accessible only in DOS mode, you would need to remove the NFS name space from the volume. If you wanted to make the MAC volume accessible to UnixWare users only in DOS mode, you would only need to remove the NFS name space from the MAC volume, not the MAC name space. This is because the NUC software on UnixWare ignores all name spaces except NFS and DOS. 3. Use the VREPAIR NetWare utility to remove the NFS name space from any volumes that you want to be accessible only in DOS mode. To load the VREPAIR utility, enter: LOAD VREPAIR volume-name at the NetWare console prompt, where volume-name is the name of the volume from which you want to remove the NFS name space. 4. Choose the Remove Name Space Support from the Volume option, and then select the NFS name space to delete it. The VREPAIR utility has a number of configuration options and should be used with care. See the NetWare System Administration documentation for more information on using VREPAIR to remove a name space from a volume. Common Problems with DOS Mode Volumes Not setup correctly on NetWare side. There are a number of things the NetWare administrator needs to do to prepare an environment for UnixWare users. If things don't seem right in terms of not being able to perform certain operations on files you think you should own, then rights or attributes may not have been set up properly for you on the server. Contact your NetWare administrator, your UnixWare administrator, or see the book "Managing NUC Connectivity".