Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fchmod(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                fchmod(2)



        _________________________________________________________________
        fchmod                                                System Call
        Change mode of file.
        _________________________________________________________________


        SYNTAX

        int   fchmod  (fildes, mode)
        int           fildes;
        int             mode;


        PARAMETERS

        fildes         File descriptor.


        mode           File's new mode.


        DESCRIPTION

        <Fildes> is a valid, active descriptor referring to an open file
        of type ordinary, directory, block special, or character special,
        or symbolic link.  The file must reside on a file system device
        mounted read-write.  Fchmod changes the file's mode (st_mode) in
        a manner semantically identical to the way chmod does.


        ACCESS CONTROL

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

        The process's effective user id must be superuser to set the
        sticky bit.  To set the set-group-id bit, the process's effective
        user id must be superuser or its effective group id must match
        the file's group id.  Failure to meet the requirements for
        setting one of these bits does not produce an error.  Note that
        meeting the first access requirement is sufficient to allow a
        process to set the set-user-id bit.


        RETURN VALUE

        0              The file's mode was successfully changed.


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



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





                                                                fchmod(2)



        EXCEPTIONS

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


        EBADF          <Fildes> is not a valid, active file descriptor.


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


        EPERM          The process is denied permission to change the
                       file's mode.


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


        SEE ALSO

        The related manual sections:  chmod(2), chown(2), creat(2),
        fchown(2), fcntl(2), fstat(2), mknod(2), mknod(2), open(2),
        read(2), stat(2), write(2),
        chmod(1).




























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



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