Trusted Solaris User's Guide

Manipulating File Labels

This section focuses on manipulating a file's sensitivity labels.


Note -

These procedures are only available to authorized users. You cannot change the label of a file or directory without being authorized by your administrator.


Viewing and Changing Labels with the File Manager

Use the File Manager when you want to view or change a file's labels.

To Determine a File's Label

  1. Display the File Manager and navigate to the directory containing the file.

  2. Select the file and choose Labels... from either the popup menu or the Selected menu.

    This step causes the Labels dialog box to be displayed (see figure below).

  3. Click Cancel to close the Labels dialog box.

    Figure 5-11 File Manager Change Label Dialog Box in Label Mode

    Graphic

The file's label appears in the Current Label field. The label will be a label or CMW label (combined), depending on how your user account is configured.

To Change a File's Label (Move Operation)

  1. Make sure that no one else is using the file whose label is to be changed.

    Changing the label of a file in use can cause serious problems when the other user attempts to save the file.

  2. Display the File Manager at the file's current label and the File Manager at the new label in the same workspace.

    This step entails opening a second workspace at a different label, displaying its File Manager, and occupying the original workspace. For a detailed example of this procedure, see "Tour: Occupying Workspaces with Applications at Different Labels".

  3. Drag the file icon from the source File Manager to the File Manager at the new label (see figure below).

    Figure 5-12 Dragging a File between File Managers at Different Labels

    Graphic

    This causes the File Manager Confirmation dialog box to be displayed. See figure below.

    Figure 5-13 File Manager Confirmation Dialog Box

    Graphic

  4. Click the Apply button in the File Manager Confirmation dialog box to complete the transfer.

To Create a Copy of a File at a Different Label (Copy Operation)

Follow the same instructions as in "To Change a File's Label (Move Operation)" except that you hold down the Control key when dragging the file icon in Step 3. Creating a copy of a file at another label is useful when you need to use the same file name although you are editing different versions of the file at different labels.

To Link a File to a Different Label (Link Operation)

Follow the same instructions as in "To Change a File's Label (Move Operation)" except that you hold down both the Shift and the Control keys when dragging the file icon in Step 3. Linking a file to another label is useful when you want to make a file with a lower label visible at higher labels. The file is only writable at the lower label.

Copying and Linking Files to Different Labels by Default

There are two special files that can be stored in your home directory for copying and linking files from your home directory at your minimum labels to your home directory at different labels. These files are provided to circumvent such problems as an application at one label that needs a file in a single-level directory at a different label. The files are:

Both files store their entries one file per line. You can specify paths to subdirectories in your home directory, but you should never use a leading slash since all paths should be within your home directory.


Note -

Your administrator may have already installed a .copy_files and .link_files file in your home directory; they are at your discretion to modify. Since there are no safeguards for dealing with such anomalies as duplicate entries in both files or file entries that already exist at other labels, it is best to work with your administrator when modifying these files.