CHMOD(2) HP Integral PC CHMOD(2) CHMOD(2) HP Integral PC CHMOD(2) CHMOD(2) HP Integral PC CHMOD(2) CHMOD(2) HP Integral PC CHMOD(2) NAME NAME NAME NAME chmod - change mode of file SYNOPSIS SYNOPSIS SYNOPSIS SYNOPSIS int chmod (path, mode) char *path; int mode; DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION Path points to a path name naming a file. Chmod sets the access permission portion of the named file's mode according to the bit pattern contained in mode . Access permission bits are interpreted as follows: 04000 Set user ID on execution. 02000 Set group ID on execution. 01000 Save text image after execution 00400 Read by owner 00200 Write by owner 00100 Execute (or search if a directory) by owner 00070 Read, write, execute (search) by group 00007 Read, write, execute (search) by others If the effective user ID of the process is not super-user, mode bit 01000 (save text image on execution) is cleared. If the effective user ID of the process is not super-user or the effective group ID of the process does not match the group ID of the file, mode bit 02000 (set group ID on execution) is cleared. If an executable file is prepared for sharing then mode bit 01000 prevents the system from abandoning the swap-space image of the program-text portion of the file when its last user terminates. Thus, when the next user of the file executes it, the text need not be read from the file system but can simply be swapped in, saving time. Chmod will fail and the file mode will be unchanged if one or more of the following are true: A component of the path prefix is not a directory. [ENOTDIR] Hewlett-Packard - 1 - (printed 12/12/84) CHMOD(2) HP Integral PC CHMOD(2) CHMOD(2) HP Integral PC CHMOD(2) CHMOD(2) HP Integral PC CHMOD(2) CHMOD(2) HP Integral PC CHMOD(2) The named file does not exist. [ENOENT] Search permission is denied on a component of the path prefix. [EACCES] The named file resides on a read-only file system. [EROFS] Path points outside the process's allocated address space. [EFAULT] RETURN VALUE RETURN VALUE RETURN VALUE RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. SEE ALSO SEE ALSO SEE ALSO SEE ALSO chown(2), mknod(2). NOTES NOTES NOTES NOTES The HP Integral PC does not support the "save text image after execution" bit. Hewlett-Packard - 2 - (printed 12/12/84)