Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chown(S) — System V/386 Software Development System 3.2.2b

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     CHOWN(S)                  UNIX System V                  CHOWN(S)



     Name
          chown - change owner and group of a file

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

     Description
          path points to a path name naming a file.  The owner ID and
          group ID of the named file are set to the numeric values
          contained in owner and group respectively.

          Only processes with effective user ID equal to the file
          owner or super-user may change the ownership of a file.

          If chown is invoked by other than the super-user, the set-
          user-ID and set-group-ID bits of the file mode, 04000 and
          02000 respectively, will be cleared.

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

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

          [ENOENT]       The named file 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 named file resides on a read-only file
                         system.

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

          [EINTR]        A signal was caught during the chown system
                         call.

          [ENOLINK]      path points to a remote machine and the link
                         to that machine is no longer active.

          [EMULTIHOP]    Components of path require hopping to
                         multiple remote machines.

     See Also

          chmod(S), chown(C).

     Diagnostics
          Upon successful completion, a value of 0 is returned.
          Otherwise, a value of -1 is returned and errno is set to
          indicate the error.

     Standards Conformance
          chown is conformant with:
          AT&T SVID Issue 2, Select Code 307-127;
          The X/Open Portability Guide II of January 1987;
          IEEE POSIX Std 1003.1-1988 with C Standard Language-
          Dependent System Support;
          and NIST FIPS 151-1.

                                                (printed 6/20/89)



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