Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
chmod(1) OSS Shell and Utilities Reference Manual
might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to the UTILSGE environment variable
is the same as specifying the -W NOG or -W NOE flag in the com-
mand.
EXAMPLES
1. To add a type of permission to several files, enter:
chmod g+w chap1 chap2
This command adds write permission for group members to the files chap1 and
chap2.
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 files 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 file (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 file cmd is executed, this command causes the effective user and
group IDs to be set to those that own the file cmd. Only the effective IDs asso-
ciated with the subprocess that runs cmd are changed. The effective IDs of the
shell session remain unchanged.
This feature allows you to permit restricted access to important files. Suppose
the file 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
dbms’s data files. 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 files owned by dbms.
2−76 Hewlett-Packard Company 527188-021