Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

setfilepriv(1) OSS Shell and Utilities Reference Manual
The -a flag adds the privilege specified by privilege _value to the file privileges of the file file.
Using PRIVNONE with this flag has no effect.
The -d ag deletes the privilege option specified by priv ilege_value from the file privileges of the
file file. Using PRIVNONE with this flag has no effect.
The -s flag sets the file privileges for the file to the specified value or values, replacing all exist-
ing file privileges. Multiple privilege values can be separated by commas. Spaces between
values or after commas are not permitted. See also the description of the PRIVNONE file
privilege.
The file privilege_file, used with the -f ag, must contain one or more of the values listed for
privilege_value, one on each line. The character # in a privilege_file indicates a comment. All
characters, starting with the # through the end of the line, are ignored. You can use the output of
the getfilepriv command to create this file.
Use on Guardian Objects
Specify Guardian files with the /G pathname convention.
EXAMPLES
1. To set PRIVSOARFOPEN privileges for the file /G/SYSTEM/SYSTEM/PRIVOBJ,
enter:
setfilepriv -s PRIVSOARFOPEN /G/SYSTEM/SYSTEM/PRIVOBJ
2. To add the PRIVSETID privilege to the file /G/SYSTEM/SYSTEM/PRIVOBJ,enter:
setfilepriv -a PRIVSETID /G/SYSTEM/SYSTEM/PRIVOBJ
3. To remove the file privileges for the file /G/SYSTEM/SYSTEM/PRIVOBJ,enter:
setfilepriv -s PRIVNONE /G/SYSTEM/SYSTEM/PRIVOBJ
4. To set both the PRIVSOARFOPEN and the PRIVSETID privileges file privileges for the
file /G/SYSTEM/SYSTEM/MYPRVOB,enter:
setfilepriv -s PRIVSOARFOPEN,PRIVSETID /G/SYSTEM/SYSTEM/MYPRVOBJ
5. To add the PRIVSETID privilege to all files in the XYZ directory, enter:
setfilepriv -a PRIVSETID /G/system/xyz/*
6. To delete the PRIVSOARFOPEN privilege from the file
/G/SYSTEM/SYSTEM/MYPRVOB,enter:
setfilepriv -d PRIVSOARFOPEN /G/SYSTEM/SYSTEM/MYPRVOBJ
7. To add the PRIVSETID file privilege and delete PRIVSOARFOPEN file file privilege
from the file /G/SYSTEM/SYSTEM/PRIVOBJ, enter:
setfilepriv -a PRIVSETID -d PRIVSOARFOPEN /G/SYSTEM/SYSTEM/PRIVOBJ
8. To set the privileges for file exe2 to the same privileges that are set for the file exe1,
create a file from the output of the getfilepriv command for exe1 and use it with the -f
flag of the setfilepriv command:
getfilepriv exe1>my_privilege_file
setfilepriv -f my_privilege_file exe2
816 Hewlett-Packard Company 527188-021