Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chown(2) — sysv — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2)

chown(1)

kopt(8)



CHOWN(2-SysV)       RISC/os Reference Manual        CHOWN(2-SysV)



NAME
     chown, fchown - change owner and group of a file

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

     int fchown (fd, owner, group)
     int fd, owner, group;

DESCRIPTION
     The owner ID and group ID of the named path or file
     described by file descriptor fd 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 the _posix_chown_restricted kernel parameter is set to
     zero, chown and fchown may not change the owner of a file
     unless executed by the super-user, and may not change the
     group of a file to a group of which the current user is not
     a member.  See kopt(8).

     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.

ERRORS
     chown will fail and the owner and group of the named file
     will remain unchanged if one or more of the following are
     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.




                         Printed 1/15/91                   Page 1





CHOWN(2-SysV)       RISC/os Reference Manual        CHOWN(2-SysV)



     [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 multi-
                    ple remote machines.

SEE ALSO
     chmod(2).
     chown(1) in the User's Reference Manual.
     kopt(8) in the System Administrator's Reference Manual.

DIAGNOSTICS
     Upon successful completion, a value of 0 is returned.  Oth-
     erwise, a value of -1 is returned and errno is set to indi-
     cate the error.





































 Page 2                  Printed 1/15/91



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