10 managing access to files and directories, Protecting files and directories, Understanding permissions – HP NonStop G-Series User Manual

Page 121

Advertising
background image

10 Managing Access to Files and Directories

This chapter describes how to control access to your files and directories. After reading this chapter,
you will be able to do the following:

Understand file and directory permissions

Display and set file and directory permissions

Change owners and groups

Understand file auditing

A good way to learn about managing directories is to try the examples in this chapter. You should
do each example in the order given.

Before you begin to work through the examples, your home directory in the OSS environment
should be in the state in which you left it after completing the examples in the previous chapter,

Chapter 9 (page 113)

, and should contain the following:

The files file1, file2, file3, record1, and record6

The /reports subdirectory that contains the files file1, file2, file3, and notes, and
the subdirectory /newstatus

The empty /project subdirectory

If you are using files with different names, make the appropriate substitutions as you work through
the examples. To produce a listing of the files in your current directory, enter the ls command.

In the empty project directory, create the files file1, file2, file3, and notes, and create
the /status subdirectory.

Protecting Files and Directories

You may want to limit other users’ access to your files and directories for one or both of the following
reasons:

Your files and directories contain sensitive information that should not be available to everyone
who uses your system.

Not everyone who has access to your files and directories should have the permission to alter
them.

Understanding Permissions

Permissions are simply codes that determine the way in which anyone working on your system can
use the files and directories. You can protect your files and directories by setting or changing their
permissions.

Setting or changing permissions is also referred to as “setting or changing the protections” on your
files and directories.

Access to files and directories is controlled in three ways:

r

(read: allows users to view or print the file)

w

(write: allows users to modify the file)

x

(execute: allows users to run the file or to search directories)

Users on the system are classified as one or more of the following:

u

(user/owner)

g

(group)

o

(all others; also known as “world”)

Protecting Files and Directories

121

Advertising
This manual is related to the following products: