10.3 Changing Permissions From the Command Line
10.3.1 Changing permissions
File and directory permissions can be changed using the chmod (change mode) command or with CDE File Manager. Normally the default permissions for a file or directory will be adequate for most security needs. There are times when you will want to change the permissions on a file or directory. By default, all files are created with permissions that allow the user category of others to read the file. This means anyone with a login id can see the contents of the file and copy it. For classified files and private information, you should remove the Read permission from the others category.

Shell scripts are another example where you would want to change permissions. When you create a shell script file (or any file), the default permissions do not include execute, even for the owner/creator of the file. To run the shell script, you must change the permissions by adding the execute permission as shown in the Figure.

The chmod command is used by a file's owner (or superuser) to change file permissions. The two modes of operation with the chmod command are symbolic (or relative) and octal (or absolute).

  • Symbolic mode - uses combinations of letters and symbols to add or remove permissions from various categories of users. Symbolic mode is also referred to as relative mode.
  • Octal mode - uses octal numbers to represent file permissions. Octal mode is also referred to as absolute or numeric mode.