Every file on your network server has a set of attributes that go beyond such basic information as name, extension, date, and time in describing the file. In addition to the file attributes you’ll find on your workstation, Novell adds attributes unique to the NetWare environment. You can use these attributes to fine-tune the file system of your NetWare server, control the compression of files, dictate whether users can copy or delete files, or hide files from view. I’ll explain how to do so using the Flag command.
Special NetWare attributes available for files and directories
Windows Explorer recognizes only the standard DOS attributes of Archive, Read Only, Hidden, and System. Novell includes additional NetWare attributes that can increase system performance and security. Novell has created special attributes for both files and directories.
NetWare directory attributes affect only the directory itself, not the files contained within the directory or its subdirectories. The NetWare directory attributes are:
- Don’t Compress (Dc): This attribute prevents NetWare from ever compressing the directory.
- Delete Inhibit (Di): This attribute prevents the directory from being deleted.
- Don’t Migrate (Dm): This attribute prevents the directory from being moved to another storage device, such as a tape drive.
- Hidden (H): This attribute prevents the directory from being seen with a DOS DIR command.
- Immediate Compress (Ic): This attribute compresses the directory immediately.
- Normal (N): This attributes clears all the other attributes and allows you to quickly reset the file.
- Purge (P): This attribute causes the directory to be permanently deleted if a user deletes it, preventing the Filer command from undeleting the directory.
- Rename Inhibit (Ri): This attribute prevents the user from renaming the directory.
- System (Sy): This attribute prevents the directory from being seen with a DOS DIR command. It also prevents the directory from being copied or deleted.
The NetWare file attributes are:
- Copy Inhibit (Ci): This attribute prevents a file from being copied, but it works only with Macintoshes.
- Delete Inhibit (Di): Similar to the DOS Read Only attribute, this attribute prevents users from deleting the file.
- Don’t Compress (Dc): This attribute prevents NetWare from ever compressing the file.
- Don’t Migrate (Dm): This attribute prevents the file from being moved to another storage device, such as a tape drive.
- Don’t Suballocate (Ds): This attribute disables NetWare’s block suballocation. Using this attribute will cause the file to take more disk space, but it’s useful if the file’s size changes frequently.
- Execute Only (X): This attribute prevents the file from being deleted, renamed, or copied. It’s valid only for .EXE or .COM files.
- Hidden (H): This attribute prevents the file from being seen with a DOS DIR command.
- Immediate Compress (Ic): This attribute compresses the file immediately.
- Purge (P): This attribute causes the file to be permanently deleted if a user deletes the file, preventing the Filer command from undeleting the file.
- Read-Only (Ro): This attribute is different from the DOS Read Only attribute. This attribute allows the file to be read but not modified. If you choose this attribute, NetWare automatically adds the Delete Inhibit and Rename Inhibit attributes to the file.
- Read-Write (Rw): This attribute allows the file to be both read and written to.
- Rename Inhibit (Ri): This attribute prevents the user from renaming the file.
- Shareable (Sh): This attribute allows more than one user to open the file at the same time.
- Transactional (T): This attribute is normally used only on database files in conjunction with NetWare’s Transactional Tracking System (TTS). The attribute allows TTS to protect the file from becoming corrupted.
Running the Flag command
The Flag command is a command-line text utility that changes NetWare attributes. The basic syntax for the Flag command is similar to that of the DOS Attrib command. You can view all the attributes of all the files in a particular directory by opening a command prompt, going to the directory, typing flag, and pressing [Enter].
You can also view the attributes for a single file by typing flag filename and pressing [Enter], where you replace filename with the name of the file whose attributes you want to check. When you enter the flag filename command, you’ll see a screen similar to the one shown in Figure A.
|You can view NetWare attributes for individual files.|
When you view the output of the Flag command, you’ll see the following columns:
- Files—Lists the filename
- DOS Attr—Lists the current DOS attributes set for the file
- NetWare Attr—Lists the current NetWare attributes set for the file
- Status—This column lists whether the file is compressed. You’ll see Cc if NetWare can’t compress the file or Co if the file is compressed. If this column is set to M, the file has been migrated from another source.
- Owner—Lists the name of the user that created or owns the file
- Mode—Search mode for the file. This is set only for executable files.
Changing the attribute of a file is very simple. To set an attribute, figure out the attribute you want to change and set it by typing flag filename +attrib, where filename is the name of the file and attrib is the attribute you want to set. Flag will display file information similar to what you saw in Figure A, but you’ll also see the attribute you set in the NetWare Attr column.
Removing an attribute is equally easy. Type flag filename –attrib and press [Enter]. This time, Flag will display the file information, but you’ll notice the attribute missing from the NetWare Attr column.
If you want to change multiple attributes, you can do so by typing flag filename attr1 attr2 attr3…attrx and pressing [Enter]. Just separate each attribute with a space, preceded by a plus sign (+) to set the attribute or a dash (–) to remove the attribute.
If you want to view all the files owned by a particular user, you can do so by typing flag /owner=username, where username is the userid of the user whose files you’re looking for. You can change ownership of the file by typing flag filename /name=username, where username is the userid of the user you want to own the file.
Flagging files from the desktop
If you’re running the Novell Client, you can change NetWare attributes from your workstation’s desktop in addition to using the Flag command from a command prompt. Novell Client’s Setup program adds the N icon to the system tray of your workstation and also integrates portions of the Client with Windows Explorer.
You have two options when copying files from your workstation’s desktop. First, you can go through the N menu by selecting N | NetWare Utilities | Object Properties. You’ll see the Select File Or Folder To Copy screen appear. Navigate through the Network Resources tree until you find the file you want to flag. Unfortunately, when using Select File Or Folder To Copy, you can select only one file or folder at a time to flag. Select one and click OK. You’ll see the NetWare Services screen, shown in Figure B.
|You can flag files from the desktop.|
On the NetWare Info tab, you can change attributes quickly by enabling or disabling the appropriate check box for the attribute. To save your changes, click OK.
The second way you can copy files from the desktop is to open Windows Explorer and find the file or files you want to flag. Right-click the file and select Properties. Unlike the method using the N menu, you can select and flag multiple files in Explorer.
When the Properties screen appears, click the NetWare Info tab. This screen will be identical to the one in Figure B, except that you’ll see the General and Summary tabs in addition to the NetWare Info and NetWare Rights tabs. Flag the attributes you want to change and click OK to save your changes.
If you’ve selected multiple files, each with different attributes, the NetWare Info tab won’t display the attribute settings for individual files. Instead, it will average out the attributes, displaying selected attributes with a gray check box. Any changes you make using the NetWare Info tab will apply to all selected files, possibly changing attributes on some files without making you aware of it.
As you can see on the NetWare Info tab, you can only view ownership information. Unlike using the Flag command, there’s no way to change file ownership through the object’s Properties page.
Rally around the flag
NetWare attributes give you more control over your files than do standard DOS attributes. In a NetWare environment, you can tweak security and performance settings at the file and directory level in ways you can’t on other platforms. All it takes is some familiarity with the Flag command.