Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ access(S) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(S)

stat(S)



     ACCESS(S)                XENIX System V                 ACCESS(S)



     Name
          access - Determines accessibility of a file.

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

     Description
          path points to a pathname naming a file.  access checks the
          named file for accessibility according to the bit pattern
          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 for amode can be formed
          by adding any combination of the following:

               04   Read
               02   Write
               01   Execute (search)
               00   Check existence of file

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

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

               Read, write, or execute (search) permission is
               requested for a null pathname.  [ENOENT]

               The named file does not exist.  [ENOENT]

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

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

               Write access is requested for a pure procedure (shared
               text) file that is being executed.  [ETXTBSY]

               Permission bits of the file mode do not permit the
               requested access.  [EACCES]

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

          access checks the permissions for the owner of a file by
          checking the ``owner'' read, write, and execute mode bits.
          For members of the file's group, the ``group'' mode bits are
          checked.  For all others, the ``other'' mode bits are
          checked.



     Page 1                                           (printed 8/7/87)





     ACCESS(S)                XENIX System V                 ACCESS(S)



     Return Value
          If the requested access is permitted, a value of 0 is
          returned.  Otherwise, a value of -1 is returned and errno is
          set to indicate the error.

     See Also
          chmod(S), stat(S)

     Notes
          The super-user (root) may access any file, regardless of
          permission settings.












































     Page 2                                           (printed 8/7/87)



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