sdfchmod(1)
NAME
sdfchmod − change mode of an SDF file
SYNOPSIS
sdfchmod mode device:file...
DESCRIPTION
sdfchmod is intended to mimic chmod(1).
An SDF file name is recognized by the embedded colon (:) delimiter (see sdf(4) for SDF file naming conventions).
The permissions of each named file are changed according to mode, which may be absolute or symbolic. An absolute mode is an octal number constructed from the OR of the following modes:
4000 set user ID on execution
2000 set group ID on execution
1000 sticky bit, see chmod(2)
0400 read by owner
0200 write by owner
0100 execute (search in directory) by owner
0070 read, write, execute (search) by group
0007 read, write, execute (search) by others.
A symbolic mode has the form:
[who] op permission [op permission]
who is a combination of the letters u (for user’s permissions), g (group), and o (other). The letter a (all) is a synomym for ugo, which is the default if who is omitted.
op can be + to add permission to the file’s mode, − to take away permission, or = to assign permission absolutely (all other bits are reset).
permission is any combination of the letters r (read), w (write), x (execute), s (set owner or group ID) and t (save text − sticky); u, g, or o indicate that permission is to be taken from the current mode. Omitting permission is only useful with = to take away all permissions.
Multiple symbolic modes separated by commas may be given. Operations are performed in the order specified. The letter s is only useful with u or g; t works only with u.
EXAMPLES
The following examples assume that an SDF directory structure exists on the HP-UX device file /dev/rdsk/c1d0s3.
Deny write permission to others for the SDF directory /bin:
sdfchmod o−w /dev/rdsk/c1d0s3:/bin
Make the SDF file /users/fred/a.out executable and readable by everyone:
sdfchmod a=rx /dev/rdsk/c1d0s3:/users/fred/a.out
Add read permission for the group associated with the SDF file /last.boot.rev:
sdfchmod g+r /dev/rdsk/c1d0s3:/last.boot.rev
Assign read and execute permission to everybody, and set the set-user-id bit for the SDF file /usr/local/hoo:
sdfchmod 4555 /dev/rdsk/c1d0s3:/usr/local/hoo
These two commands perform the same function: give read, write, and execute permission to the owner; and read and execute permissions to everybody else for the SDF file /users/debbie/script:
sdfchmod a=rx,u+w /dev/rdsk/c1d0s3:/users/debbie/script
sdfchmod 755 /dev/rdsk/c1d0s3:/users/debbie/script
AUTHOR
sdfchmod was developed by HP.
SEE ALSO
Hewlett-Packard Company — HP-UX Release 9.03: April 1994