Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (c) chmod(1)
2. To make several permission changes at once, enter:
chmod go-w+x mydir
This command denies group members and others the permission to create or delete les
in the directory mydir (go-w) and allows them to search mydir or use it in a pathname
(go+x). This command is equivalent to the following command sequence:
chmod g-w mydir
chmod o-w mydir
chmod g+x mydir
chmod o+x mydir
3. To permit only the owner to use a shell procedure as a command, enter:
chmod u=rwx,go= cmd
This command gives read, write, and execute permission to the user who owns the le
(u=rwx). It also denies the group and others the permission to access cmd in any way
(go=).
4. To use set-ID modes, enter:
chmod ug+s cmd
When the le cmd is executed, this command causes the effective user and group IDs to
be set to those that own the le cmd. Only the effective IDs associated with the subpro-
cess that runs cmd are changed. The effective IDs of the shell session remain
unchanged.
This feature allows you to permit restricted access to important les. Suppose the le
cmd has the set-user-ID mode enabled and is owned by a user called dbms. dbms is not
actually a person but might be associated with a database management system. The user
betty does not have permission to access any of dbmss data les. However, she does
have permission to execute cmd. When she does so, her effective user ID is temporarily
changed to dbms, so that the cmd program can access the data les owned by dbms.
This way betty can use cmd to access the data les, but she cannot accidentally damage
them with the standard shell commands.
5. To use the absolute mode form of the chmod command, enter:
chmod 644 text
This command sets read and write permission for the owner, and it sets read-only mode
for the group and all others.
NOTES
Because /G and /E both appear in your local root directory, you should be very careful when
using OSS shell commands on or from the root directory. OSS shell commands that perform
recursive actions make no distinction between Guardian and OSS les or between local and
remote les. You can use the -W NOG and -W NOE ags or the UTILSGE environment vari-
able to exclude objects in the Guardian le system or objects accessible through the Expand pro-
duct.
527188-007 Hewlett-Packard Company 245