| United States-English |
|
|
|
![]() |
Using Your HP Workstation > Chapter 18 Making Your System SecureProtecting Your Files and Directories |
|
Three classes of users can access files and directories: owner, group, and other. For each of these classes of users, there are three types of access permissions: read, write, and execute. Who Has Access? The three classes of users are:
What Kind of Access? The access permissions on a file or directory specify how it can be accessed by the owner, group, and other user classes. Table 18-1 A Comparison of Permissions for Directories and Files
You should always be aware of the permissions assigned to your files and directories. Check your files and directories periodically to make sure appropriate permissions are assigned. If you find any unfamiliar files in your directories, report them to the system administrator or security officer. Always carefully consider the permissions you allow on your files and directories. Give others access to them only when you have good reason to do so (if you are working on a group project, for example, your group may need access to certain files or directories). The ll (long listing) command displays the following information:
To see the permissions, owner name, and group name on myfile, for example, type the following:
When you press Enter, you should see something like this:
The first dash on the left indicates that myfile is a file (if myfile were a directory, you would see a d in place of the dash). Here is a closer view with all permissions indicated (note that the permissions are in sets of three):
If a permission is not allowed, a dash appears in place of the letter. In the example above (-rw-r--r--), owner (leslie) has read and write permission (rw-); group (users) and other have only read permission (r--). To display permissions showing owner, group, and other for a specific directory, use the ll command with the -d option. For example, to see the permissions on the projects directory below the current directory, type the following:
When you press Enter, you should see something like this:
The first character (d) in the long listing above indicates that projects is a directory. The next nine positions (three sets of three) indicate the read (r), write (w), and search (x) permissions for owner, group, and other. If a permission is not allowed, a dash appears in place of the letter. Here is a closer view with all positions indicated:
Then, in the original example above (drwxr-x---): The owner (leslie) has read, write, and search permission (rwx); group (users) has read and search permission (r-x); other has no access (---) to the projects directory. Make sure that permissions assigned to sensitive files and directories are appropriate. Here are some general suggestions:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||