Like a house or automobile, Uniform Access computer accounts must be protected. If you are not careful, your account and files can be broken into, vandalized, or even stolen by unlawful computer users.
You set these permissions for three classes of users:
You can view the permissions of your files using the ls -l command. The ls -l command lists the contents of your directory in long format. For example:
| drwxr-xr-x | 2 userid | 512 Sep 14 08:24 | Sales | ||
| drwxr-xr-x | 2 userid | 512 Sep 14 08:24 | Receipts | ||
| -rw-r--r-- | 1 userid | 0 Sep 14 08:24 | budget |
Figure 3: Permission Settings for a File and a Directory
The first character indicates file type: a - (hyphen) indicates an ordinary file, and a d indicates a directory. Unix considers the next nine characters as three sets of three. The first set of three determines the owner's permissions, the second set determines the group's permissions, and the third set determines all others' permissions.
If you wish to change the permissions of a file or directory, you can use the chmod (change mode) command. The chmod command uses a number code. Each permission setting corresponds to a number between 0 and 7. For each file or directory, you assign three numbers between 0 and 7.
The following shows how the permissions correspond to each number code:
| 7 | Read, Write, and Execute | (rwx) | |||
| 6 | Read and Write only | (rw-) | |||
| 5 | Read and Execute only | (r-x) | |||
| 4 | Read only | (r--) | |||
| 3 | Write and Execute only | (-wx) | |||
| 2 | Write only | (-w-) | |||
| 1 | Execute only | (--x) | |||
| 0 | No Permissions | (---) |
To change the permissions of a file, enter:
chmod code file
Where code is the three-digit number corresponding to the permissions you desire.
Note: When you set permissions for a file that you want others to use, you must make sure that your directories along the pathname leading to the file also have the appropriate permissions.
|
To set the permissions of a file so other users cannot read or write to
it, enter:
chmod 600 file
To see the new permissions for the file you specify, use the
ls -l file commmand. |
To change your password, enter:
passwd
This initiates a program that first verifies your old password, then lets you type a new password, and finally asks you to retype your new password.
Keep these items in mind when choosing a password:
assets
Figure 4: Assets Command Display
This shows both your threshold, the amount you are allotted, and your usage averaged over a five-day period. When your CPU usage goes beyond your threshold amount, the computer will assign your commands a lower priority, and they will take longer to complete. If you exceed your disk space limit, you will be warned and given some time to clean up your account.
The du (disk usage) command is useful for viewing the amount of disk space, measured in kilobytes, each of your directories occupies.
To view your account's disk usage, enter:
du
For more information about accounts, enter:
help accounts
If you are like other Uniform Access users, you may eventually use up your account's resources. Before you panic, try some of the following techniques:
For more information about disk space and use, enter:
help diskuse