Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chown(2) — sys5 — Apollo Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chown(1)

chmod(2)



CHOWN(2)                 DOMAIN/IX SYS5                  CHOWN(2)



NAME
     chown - change owner and group of a file

USAGE
     int chown (path, owner, group)
     char *path;
     int owner, group;


DESCRIPTION
     Path names a file.  Chown sets the owner ID and group ID of
     that file to the numeric values contained in owner and
     group, respectively.  Only processes with the effective user
     ID of the file owner or those with the ID of the super-user
     may change the ownership of a file.  If chown is invoked by
     anyone other than the super-user, the set-user-ID and set-
     group-ID bits of the file mode, 04000 and 02000 respec-
     tively, are cleared.

RETURN VALUE
     A successful call returns zero.  A failed call returns -1
     and sets errno as indicated below.

ERRORS
     Chown will fail and the owner and group of the named file
     remain unchanged if one or more of the following is true:

     [ENOTDIR] A component of the path prefix is not a directory.

     [ENOENT]  The file named does not exist.

     [EACCES]  Search permission is denied on a component of the
               path prefix.

     [EPERM]   The effective user ID does not match the owner of
               the file and the effective user ID is not super-
               user.

     [EROFS]   The file named resides on a read-only file system.

     [EFAULT]  Path points outside the allocated address space of
               the process.

NOTES
     The DOMAIN System's single level store architecture requires
     that all filesystem objects be readable in order to be
     writeable or executable.  Since write-only or execute-only
     files would be unusable in DOMAIN/IX, modes that specify 02
     (write-only) or 01 (execute-only) are ORed with 0400 to
     force read permission.  This applies to the owner, group,



Printed 12/4/86                                           CHOWN-1







CHOWN(2)                 DOMAIN/IX SYS5                  CHOWN(2)



     and world portions of the mode word.  For example, if mode
     0631 were specified, the mode applied to the file would
     actually be 0675.

RELATED INFORMATION
     chown(1) chmod(2)















































CHOWN-2                                           Printed 12/4/86





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026