Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ access(2) — sys5 — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought



ACCESS(2)       DOMAIN/IX Reference Manual (SYS5)       ACCESS(2)



NAME
     access - determine accessibility of a file

USAGE
     int access (path, amode)
     char *path;
     int amode;

DESCRIPTION
     The path argument points to the pathname of a file.  Access
     checks that file for access rights according to the bit pat-
     tern contained in amode, using the real user ID in place of
     the effective user ID and the real group ID in place of the
     effective group ID.  The bit pattern contained in amode is
     structured as follows:

          04   read
          02   write
          01   execute (search)
          00   check existence of file

RETURN VALUE
     If the access requested is permitted, a value of zero is
     returned.  Otherwise, a value of -1 is returned and errno is
     set to indicate the error.

ERRORS
     Access to the file is denied if one or more of the following
     is true:

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

     [ENOENT]       The call asked for the permissions of a null
                    pathname, i.e., path was omitted from the
                    call.

     [ENOENT]       The file named does not exist.

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

     [EROFS]        Write access is requested for a file on a
                    read-only file system.

     [ETXTBSY]      Write access is requested for a pure pro-
                    cedure (shared text) file that is being exe-
                    cuted.

     [EACCESS]      The file's permission bits do not permit the
                    access requested.




Printed 5/10/85                                          ACCESS-1





ACCESS(2)       DOMAIN/IX Reference Manual (SYS5)       ACCESS(2)



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

     If the same user owns both the program file and the file
     being checked, access checks the ``owner'' read, write, and
     execute mode bits.  If a member (other than the owner) of
     the file's group owns the program, the ``group'' mode bits
     of the file  are checked.  If anyone else owns the program,
     the ``other'' mode bits determine the accessibility.  (See
     chmod(2) for a further explanation of the access bits.)

RELATED INFORMATION
     chmod(2), stat(2)










































ACCESS-2                                          Printed 5/10/85



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