Chapter 9. Sharing and Protecting Work
Prev |  | Next

## Chapter 9. Sharing and Protecting Work

Files that you own can be shared with other users on a network. If you do not want other users to access your files, you can change the permissions on those files.

You can also copy files to and from tapes and floppy disks or to and from other systems on the network. Creating extra copies of files you own and placing them on a tape or on another system is a good way to back up your system.

For details, click an item on the list below.

- “Understanding Permissions”

- “Sharing Directories”

- “Copying Files Across the Network”

- “Copying Files to and From a Tape”

- “Copying Files to and From a Floppy Disk”

- “Making a Backup”

## Understanding Permissions

Every time you create a new file, the system automatically identifies you as the file's owner, and assumes that you don't want other users to change the file but you do want others to be able to read its contents. In this way, the system sets ownership and permission settings for the file.

For details, click an item on the list below.

- “Changing Permissions”

- “Owner, Group, and Others: A Definition”

- “Permissions Settings: A Definition”

- “Determining Who Owns a File or Directory”

- “Preventing Other Users From Viewing a File You Own”

- “Making a Private Directory”

- “Giving Yourself Permission to View and Edit Another User's File”

- “Making Another User the Owner of a File”

- “Sharing Directories”

## Changing Permissions

Each file on the system is owned by one login name, and has a list of who can and cannot access the file in different ways. You can change permissions on files that you own (that is, those labelled with your login name) using the Permissions form.

To open the Permissions form, select the file or directory icon whose permissions you want to change; then select “Permissions” from the Selected menu.

## Owner, Group, and Others: A Definition

When you set permission settings for a file or directory, you divide users into three categories: you (the file's owner), your group, and everyone else.

The concept of a group is important in working environments that require an added level of privacy. For example, suppose you are part of a team that is working on a new product. You need to share files with others on the team, but you don't want people outside of the team to view or modify these files. You form a group. See “Creating a User Group” in the Personal System Administration Guide to learn how to establish and modify groups.

## Permissions Settings: A Definition

You can grant varying levels of permission settings for files and directories. The three levels for files are read, write, and execute.

- Read allows people to view a file but does not allow them to edit it.

- Write allows people to view and make changes to files.

- Exec allows people to run applications and commands and open directories to view and search their contents.

The three levels for directories are read, write, and search.

- Read allows people to view the files in a directory.

- Write allows people to copy, delete, or move files into a directory.

- Search allows people to pass through a directory on their way to another directory.

## Determining Who Owns a File or Directory

The Permissions form lets you find out who owns a file or directory.

1. Select the file or directory icon.

2. Choose “Permissions” from the Selected menu. If the selected icon is on the desktop, choose “File Permissions” from the Selected toolchest.

   The name of the file's owner appears next to the “Owner” label.

## Preventing Other Users From Viewing a File You Own

The system assumes the following about files that you own:

- You want other users to view the contents of these files.

- You don't want other users to change the files.

You can change this setting so that other users are unable to view the file. To do so, you need to use the Permissions form.

If the Permissions form is not already open on your screen, select the icon whose permission settings you want to change; then choose “Permissions” from the Selected menu. If the selected icon is on the desktop, choose “File Permissions” from the Selected toolchest. The Permissions form opens.

To prevent others from viewing a file you own:

1. Click the Read button for Group and Others. The checkmark disappears.

   A button is activated when it has a checkmark; a button is deactivated when the checkmark is removed.

2. Click Apply to enact the change.

3. Click Close to close the form.

## Making a Private Directory

You can prevent other users from viewing a directory you own by using the Permissions form.

If the Permissions form is not already open on your screen, select the folder icon for the directory you want to make private; then choose “Permissions” from the Selected menu. If the selected folder is on the desktop, choose “File Permissions” from the Selected toolchest. The Permissions form opens.

To make a directory private:

1. Click the Read buttons for Group and Others to remove the checkmarks.

   A button is activated when it has a checkmark; a button is deactivated when the checkmark is removed.

2. Click Apply to enact the change.

3. Click Close to close the form.

## Giving Yourself Permission to View and Edit Another User's File

If you want to view or edit another user's file, and you do not have permission to do so, you can change the permissions if:

- The system has a root password and you know either the root password or the password for the user's account.

- The system does not have a root password

To change the permissions on another user's file:

1. Select the file you want to change; then choose “Permissions” from the Selected menu. If the selected file is on the desktop, choose “File Permissions” from the Selected toolchest.

2. Click one of the boxes beneath “Read” or “Write” to the right of the “Others” label; then click the Apply button.

   - If no password is required, the change will occur.

   - If a password is required, a permissions password form appears.

     The name “root” appears in the Login Name field. You can either type the root password in the Password field or type in the name of another privileged user in the Login Name field and that user's password in the Password field. Click the Ok button to close the password form; then click the Apply button to apply the changes.

3. Click Close to close the Permissions form.

## Making Another User the Owner of a File You Own

If you own a file, you can easily transfer ownership of the file to another user. To do so, use the Permissions form.

If the Permissions form is not already open on your screen, select the icon whose permissions you want to change; then choose “Permissions” from the Selected menu. If the icon is on the desktop, choose “File Permissions” from the Selected toolchest.

To make another user the owner of a file:

1. In the field next to Owner, type the login name of the person whom you want to become the file's owner.

2. Click the Apply button to enact the change.

3. Click Close to close the form.

## Sharing Directories

When you share a directory with other systems, users on those systems can drag the directory from your system's System Manager window onto their own desktops and access it as if the directory resided on their own system. Please click on a topic for more information.

- “Overview of Sharing a Directory”

- “Sharing a Directory So Others Can View and Change Its Contents”

- “Sharing a Directory With Customized Access Permissions”

### Overview of Sharing a Directory

If you have the optional NFS software installed, you can share directories with other systems on the network. (See “Checking the Software Configuration” to find out whether NFS is installed.) All shared directories appear in the Shared Resources area of the System Manager window.

You use the Share window to specify which systems can view or change the contents of a directory. When a person on a system with which you are sharing a directory drags the directory from your system's System Manager window onto his desktop, the person can open the directory and use it just as if it resided on his own system.

Just like any directory that actually does reside on that person's system, if files and subdirectories within the shared directory belong to someone else and are marked as view-only or private, the person may not be able to open or change them.

For example, say you share a directory and specify that users on other systems can change its contents. That directory contains three subdirectories: two are private (others can't view or change them), and one is public. A person on another system can view and change the public directory, and can create new directories in the shared directory. But the private directories remain private.

### Sharing a Directory So Others Can View and Change Its Contents

If the window that lets you share a directory is not already open, open it by selecting the directory that you want to share and choosing “Share” from the Selected toolchest or menu.

To share a directory so others can view and change its contents, follow these steps:

1. In the Share window, specify which systems may access the directory.

   - To let all systems on your local network access it, click the box next to All systems.

   - To share with a select set of systems, click the box next to Only these systems, then type in the name of one system and click the Add button; repeat this for each system. An icon for each host appears in the list.

     You could also choose “Hosts” from the Find toolchest, find the systems, and drag their icons into the share list.

   - If you accidentally add a system to the list, select the system's icon and click the button labeled Delete System from Share List.

2. Have the system share the directory, or customize the access permissions.

   - To let the systems in the list view and change the directory, click OK. The directory appears in the Shared Resources area of your System Manager window, and the other systems can now access it.

   - To customize permissions so some or all of the systems in the list have more or less access to the directory, see “Sharing a Directory With Customized Access Permissions.”

   - To cancel your request to share the directory, make sure the box next to No systems is checked, and click the OK button.

### Sharing a Directory With Customized Access Permissions

If the window that lets you share a directory is not already open, open it by selecting the directory that you want to share and choosing “Share” from the Selected toolchest or menu.

To customize access permissions, follow these steps:

1. In the Share window, specify which systems may access the directory.

   - To let all systems on your local network access it, click the box next to All systems.

   - To share with a select set of systems, click the box next to Only these systems, then type in the name of one system and click the Add button; repeat this for each system. An icon for each host appears in the list.

     You could also choose “Hosts” from the Find toolchest, find the systems, and drag their icons into the share list.

   - If you accidentally add a system to the list, select the system's icon and click the button labeled Delete System from Share List.

2. Click the box next to Customize permissions.

3. In the Accept changes from area, specify which systems can change the directory.

   - To prevent any systems from changing the directory, click the box next to No systems.

   - To allow all systems that are in the share list to change the directory, click the box next to All systems.

   - To allow some systems that are in the share list to change the directory, click the box next to These systems, and drag their icons into the Accept Changes list.

   - If you accidentally add a system to the list, select the system's icon and click the button labeled Delete System from Accept Changes List.

4. In the Give Administrator privileges to area, you can let the Administrator of another system access the directory as if he were the Administrator of your system.

   | Note: The Administrator has permission to delete every file and directory on the system. Do not give these privileges to more than a few qualified people.

   - To prevent any systems from having Administrator privileges, click the box next to No systems.

   - To allow some systems that are in the share list to have Administrator privileges, click the box next to These systems, and drag their icons into the Administrator list.

   - If you accidentally add a system to the list, select the system's icon and click the button labeled Delete System from Administrator List.

5. If someone whom the system doesn't recognize wants to access the directory, specify a known login account that the person can use, such as the `guest` account.

6. When all the information is correct, share the directory, or cancel your request to share it.

   - To share the directory with these access permissions, click OK. The directory appears in your System Manager window, and other systems can now access it.

   - To cancel your request to share the directory, click the Cancel button.

## Copying Files Across the Network

If your system is on a network, you can copy files to and from other systems on the network. To do so, drag icons from one Directory View window to another or use one of several IRIX commands.

| Note: If you need to use files on another workstation quite frequently, you may place its icon on the desktop.

### Copying Files From One System to Another Using Directory View Windows

To copy files from one system to another, open a Directory View window of the local directory and a Directory View of the remote directory. Then drag the file you want to copy from one Directory View to the other.

Before you copy files, make sure the directory and file permissions are set so they are readable and writable. You can check the file and directory permissions by choosing “Permissions” from the Selected menu in the Directory View window. See “Understanding Permissions” for information on how to change the permissions.

To copy a file to or from another system on the network:

1. Open a Directory View of the directory on your system to which or from which you want to copy a file.

2. Choose “Remote Directory” from the Desktop toolchest.

   The Open Remote Directory window appears.

3. Type a user name in the text field below the “As User” label.

   You need to type in the name of a user who has a login account on the remote system and does not have a password. If you do not have an account on the remote system, or know another account name, try guest.

4. Type the name of the remote system in the text field below the “On Host” label.

5. Type the full pathname of the remote directory you want to open in the text field below the “ Remote Directory” label.

6. After you have filled in the above information, click the Ok button.

   A Directory View of the remote directory appears on your desktop.

7. Drag the file you want to copy from one Directory View to the other. A copy of the file appears in the new location.

8. Close the remote Directory View window by double-clicking the button in the upper left corner of the window border.

### Using the `rcp` Command to Transfer Files and Directories

You can copy information to and from another system using the graphical interface. You can also use the `rcp` command to transfer files.

#### Anatomy of the `rcp` Command

You can use the `rcp` (remote copy) command to copy information from your system to another system, or vice versa. To do so, you need this information:

- The name of the system you are copying to or from and, if the system is in a different domain, the domain name.

- A login name to access the system.

- The pathname of the file being copied.

- A pathname indicating where you want the copied file to be placed on your workstation.

The command syntax shows how you specify this information:

`rcp [user@]source[.domain]:filename local_filename`

(The square brackets indicate that the information contained within them is optional.)

See the `rcp` reference page (man page) for more detailed information on the command syntax.

#### Copying Files From Another System Using the `rcp` Command

This section shows how to use the `rcp` command to copy files from another system. See “Anatomy of the rcp Command” for more details on the command.

This example supposes you want to copy `file1` from `/usr/people/fred` on a system named `IRIS9` and place it in the `/usr/tmp` directory on your system.

1. Open a shell window by choosing “Unix Shell” from the Desktop toolchest.

2. If you have a login account on `IRIS9`, type:

   `rcp IRIS9:/usr/people/fred/file1 /usr/tmp`

   If you don't have a login account on `IRIS9`, copy the files as guest by typing:

   `rcp guest@IRIS9:/usr/people/fred/file1 /usr/tmp`

   | Note: If `IRIS9` is in a different domain (`bldg2`, for example), you would use `IRIS9.bldg2` in the example below instead of `IRIS9`.

3. Press `<Enter>`.

#### Copying Files to Another System Using the `rcp` Command

This section shows how you use the `rcp` command to copy files to another system. See “Anatomy of the rcp Command” for more details on the command.

This example supposes you want to copy`file2` from
`/usr/people/joe` on your system to `/usr/tmp` on a system called `IRIS9`.

1. Open a shell window by choosing “Unix Shell” from the Desktop toolchest.

2. Type:``

       rcp /usr/people/joe/file2 guest@IRIS9:/usr/tmp

#### Copying a Directory Using the `rcp` Command

To copy a directory and its contents from one system to another, you use the`-r` option to `rcp`. This example shows what you would type to copy the directory `/usr/people/joe/reports` from your system to `/usr/tmp` on a system called `IRIS9`.

1. Open a shell window by choosing “Unix Shell” from the Desktop toolchest.

2. Type:

       rcp -r /usr/people/joe/reports guest@IRIS9:/usr/tmp

   | Note: The `-v` option lets you see the names of files as they are copied. Consider the example. If you add the `-v` option, you see the names of the files in the `reports` directory as they are copied to `IRIS9`.

### Using `ftp` to Copy Files to Another System

The `ftp` program lets you transfer files using the Internet File Transfer Protocol. To use `ftp`, you must have a login account with a password on the remote workstation. If the account doesn't have a password, `ftp` will not work.

#### Using `ftp` to Log Into Another System

To use the `ftp` command to transfer files between workstations, you must first log in to the remote machine using `ftp`. This example shows how to use `ftp` to connect to the system `IRIS9`.

| Note: If `IRIS9` is in a different domain (`bldg2`, for example), you would use `IRIS9.bldg2` in the example below instead of `IRIS9`.

1. Open a shell window by choosing “Unix Shell” from the Desktop toolchest.

2. Start the program by typing:

       ftp IRIS9

3. Press `<Enter>`.

   The screen displays something similar to this:

       Connected to IRIS9.
       220 IRIS9 FTP server ready.

4. Type the login name at the prompt that appears; then press `<Enter>`. A user named `joe` would type:

       Name (IRIS9:joe): joe

5. Type the password at the password prompt; then press `<Enter>`.

       331 Password required for joe.
       Password:

   | Note: If the account does not have a password, you cannot use `ftp`.

6. You are logged in when the screen displays:

   `230 User joe logged in.`

#### Copying a File to Another System Using the `ftp` Command

Once you are logged in to the remote workstation, you can transfer files from your system to `IRIS9`, and vice versa, using the `put` and `get` commands. (If you have not logged in to the other workstation yet, see “Using ftp to Log Into Another System.”)

This example shows how to transfer a file called `file1` from your machine to `IRIS9`. Type the following at the `ftp` prompt:

    ftp> put /usr/people/joe/file1 /usr/tmp

This copies `file1` from `/usr/people/joe` on your system to `/usr/tmp` on `IRIS9`.To copy `file2` from `IRIS9` to your system, type:

    ftp> get /usr/people/fred/file2 /usr/tmp

This copies `file2` from `/usr/people/fred` on `IRIS9` to the`/usr/tmp` directory on your system.

The `ftp` program has many options. See the `ftp` reference page (man page) for further details.

## Copying Files to and From a Tape

If you have a tape drive attached to your system, you can easily copy files to and from a tape using the tape tool.

If you do not have a tape drive attached to your system, you can copy files to and from a tape on a remote system by placing the tape drive icon onto your desktop. See “Finding a Tape Drive” for information on how to find a remote tape drive.

Also see “About Tape Formats and Capacities” in the Personal System Administration Guide; it explains the different types of tapes that are available.

For details on copying files to and from a tape, see:

- “Copying Files to a Tape”

- “Listing Files on a Tape”

- “Retrieving Files From a Tape”

### Copying Files to a Tape

Use the tape tool to copy files to a tape. If you do not already have the tape tool open on your screen, open it by placing a blank tape in the tape drive, selecting the tape drive icon on your desktop, and selecting “Save/Restore Files” from the Selected toolchest.

If you use a tape that is not blank, place the tape in the tape drive, then double-click the tape drive icon to open the tape tool.

To copy files to a tape:

1. Click on the button in the lower left corner of the window and choose “ tar” or “cpio.”

2. Click on the button to the right of the tar/cpio button and choose “Write.”

3. Select the file and directory icons you want to copy to the tape; then drag the icons into the tape tool window.

   If you want to delete any files or directories from this list, click on the item you want to delete. Then click the Remove from List button. The item disappears from the list.

4. Click the Apply button.

   A notifier appears prompting you to load the tape in the tape drive if it is not already loaded.

5. Click the Accept button in the notifier window.

   A window appears listing the files as they are copied. When the files are successfully copied onto the tape, you see a message.

   | Note: When you copy files onto a tape, you write over any other data already on that tape.

6. Click the Cancel button to close the tape tool form.

7. Eject the tape by selecting the tape drive icon and choosing “Eject <Tape>” from the Selected toolchest. (<Tape> is the type of tape you are using.)

8. Place a label on the tape and label it cpio or tar tape, depending on the method you used to transfer the files.

### Retrieving Files From a Tape

Use the tape tool to retrieve files from a tape. If you do not already have the tape tool open on your screen, open it by placing a tape in the tape drive and double-clicking the tape drive icon on your desktop.

To retrieve files from a tape:

1. Click on the button in the lower left corner of the tape tool window.

   - Choose “ tar” if the files were copied to the tape using `tar`.

   - Choose “cpio” if the files were copied to the tape using `cpio`.

2. Click on the button to the right of the tar/cpio button and choose “Read.”

3. Type a destination directory in the directory field.

4. Click the Apply button.

   A notifier appears prompting you to load the tape in the tape drive if it is not already loaded.

5. Click the Accept button in the notifier window.

   The files are copied onto your system.

6. Click the Cancel button to close the tape tool.

7. Eject the tape by selecting the tape drive icon and choosing “Eject <Tape>” from the Selected toolchest. (<Tape> is the type of tape you are using.)

### Listing Files on a Tape

Use the tape tool to list (view) the contents of a tape without copying the contents onto your system. If you do not already have the tape tool open on your screen, open it by placing a tape in the tape drive and double-clicking the tape drive icon on your screen.

1. Click on the button in the lower left corner of the tape tool window.

   - Choose “ tar” if the files were copied to the tape using `tar`.

   - Choose “cpio” if the files were copied to the tape using `cpio`.

2. Click on the button to the right of the tar/cpio button and choose “List.”

3. Click the Apply button.

   A notifier appears prompting you to load the tape in the tape drive if it is not already loaded.

4. Click the Accept button in the notifier window.

   A list of the contents of the tape appears in the Tape tool window.

5. Click the Cancel button to close the tape tool.

6. Eject the tape by selecting the tape drive icon and choosing “Eject <Tape>” from the Selected toolchest. (<Tape> is the type of tape you are using.)

## Copying Files to and From a Floppy Disk

If you have a floppy disk drive attached to your system, you can copy files to and from a floppy disk. You can also copy Macintosh and DOS PC files onto your system.

If you are copying files from a Macintosh or DOS PC, make sure the application software is compatible with application software available on your system. Depending on the application, some files may need to be run through a translator before you can use them.

| Note: Always use the desktop when copying Macintosh files, (not the standard IRIX `cp` or `rcp` utilities). The desktop copies all the necessary components of the file, including the data fork , the resource fork, and the Finder information.

### Copying Files Onto a Floppy Disk

To copy files onto a floppy disk:

1. Insert a floppy disk into your drive.

   The floppy icon on your desktop changes to show that a floppy is present in the drive.

2. Open a Directory View window of the directory that contains the files you want to copy.

3. Double-click the floppy drive icon to open a Directory View of the contents of the floppy disk; then drag the files you want to copy into this window.

4. Close the Directory View of the floppy disk by double-clicking the button in the upper left corner of the window border.

5. Eject the floppy disk by selecting the floppy drive icon and choosing “Eject Floppy” from the Selected toolchest.

| Note: Always use the desktop when copying Macintosh files, not the standard IRIX `cp` or `rcp` utilities. The desktop copies all the necessary components of the file, including the data fork , the resource fork, and the Finder information.

### Copying Files From a Floppy Disk

You can copy files from a floppy disk by opening up a directory view of the files on the floppy and dragging them into a directory view on your system.

If you are copying files from a Macintosh or DOS PC, make sure the application software is compatible with application software available on your system. Depending on the application, some files may need to be run through a translator before you can use them.

To copy files from a floppy disk onto your system:

1. Insert the floppy disk into the drive.

   A floppy disk icon appears on your screen.

2. Double-click the icon to open a Directory View of the files on the floppy disk.

3. Open a Directory View window of a directory on your machine to which you want to copy the files.

4. Drag the files from the floppy disk Directory View into the Directory View you opened on your system.

   The files are copied to the new location.

5. Close the Directory View of the floppy disk by double-clicking the button in the upper left corner of the window border.

6. Eject the floppy disk by selecting the floppy drive icon and choosing “Eject Floppy” from the Selected toolchest.

| Note: Always use the desktop when copying Macintosh files (not the standard IRIX `cp` or `rcp` utilities). The desktop copies all the necessary components of the file, including the data fork , the resource fork, and the Finder information.

## Making a Backup

Making a backup of your work means creating an extra copy of your files and storing them elsewhere, such as on another workstation or on a tape. The first two methods listed below describe how to make a backup copy of select files; the third method describes howto back up the entire system.

- To make a backup copy of several files, copy them onto a tape using the tape tool. See “Copying Files to a Tape.”

- To copy a few files onto another workstation, see “Copying Files From One System to Another Using Directory View Windows.”

- To make a complete backup using the Back Up and Restore tool in the System Manager, see “Backing Up and Restoring Files” in the Personal System Administration Guide. This method creates a backup of your entire system; if the workstation ever crashes, you can restore your working environment using these backup tapes.

Prev | Table of Contents | Next
Chapter 8. Managing Windows |  | Chapter 10. Customizing the Desktop