Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fchown(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                fchown(2)



        _________________________________________________________________
        fchown                                                System Call
        Change user id and group id of a file.
        _________________________________________________________________


        SYNTAX

        int   fchown  (fildes, user, group)
        int            fildes;
        int              user;
        int             group;


        PARAMETERS

        fildes         Descriptor of the file.


        user           File's new user id.


        group          File's new group id.


        DESCRIPTION

        <Fildes> is a valid, active descriptor referring to an open file
        of type ordinary, directory, block special, block character, or
        symbolic link.  The file must reside on a file system device
        mounted read-write.  Fchown changes the file's user id (st_uid)
        and group id (st_gid) to the values contained in <user> and
        <group>, respectively.

        The semantics of changing the user and group ids are the same as
        those described in chown.


        ACCESS CONTROL

        The effective user id of the calling process must be superuser or
        match the file's user id.


        RETURN VALUE

        0              The user id and group id of the file were
                       successfully changed.


        -1             An error occurred.  Errno is set to indicate the



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                fchown(2)



                       error.


        EXCEPTIONS

        Errno may be set to one of the following error codes:


        EBADF          The descriptor does not refer to an open file.


        EINVAL         The descriptor refers to a pipe or an object that
                       is not a file.


        EPERM          Permission to change the file's user and group ids
                       is denied.


        EROFS          The named file resides on a file system device
                       mounted read-only.


        SEE ALSO

        The related manual sections:  chmod(1),
        chmod(2), chown(2), fchmod(2).



























        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



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