access man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

access(2)							     access(2)

NAME
       access - Determines the accessibility of a file

SYNOPSIS
       #include <unistd.h>

       int access(
	       const char *path,
	       int access_mode );

STANDARDS
       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       access(): XSH4.0, XSH4.2, XSH5.0

       Refer to the standards(5) reference page	 for  more  information	 about
       industry standards and associated tags.

PARAMETERS
       Points  to  the file pathname. When the path parameter refers to a sym‐
       bolic link, the access() function returns information  about  the  file
       pointed to by the symbolic link.

	      Permission  to  access  all  components of the path parameter is
	      determined by using a real user ID instead of an effective  user
	      ID,  and a group access list (including a real group ID) instead
	      of an effective group ID.	 Specifies the type of access. The bit
	      pattern contained in the access_mode parameter is constructed by
	      a logical OR of the following values:  Checks  read  permission.
	      Checks  write  permission.   Checks execute (search) permission.
	      Checks to see if the file exists.

DESCRIPTION
       The access() function checks for accessibility of the file specified by
       a pathname.

       Only  access bits are checked. A directory may be indicated as writable
       by access(), but an attempt to open it for writing will fail  (although
       files  may be created there); a file's access bits may indicate that it
       is executable, but the execve() function can fail if the file does  not
       contain the proper format.

NOTES
       The access() function is supported for multi-threaded applications.

RETURN VALUES
       Upon  successful	 completion,  the access() function returns value of 0
       (zero). Otherwise, a value of -1 is returned and errno is set to	 indi‐
       cate the error.

ERRORS
       If  the	access()  function  fails, access to the file specified by the
       path parameter is denied and errno may be set to one of	the  following
       values:	Permission  bits  of the file mode do not permit the requested
       access, or search permission is denied on a component of the path  pre‐
       fix.  The  owner	 of  a file has permission checked with respect to the
       ``user'' read, write, and execute mode  bits,  members  of  the	file's
       group  other than the owner have permission checked with respect to the
       ``group'' mode bits, and	 all  others  have  permissions	 checked  with
       respect	to the ``other'' mode bits.  The path parameter points outside
       the allocated address space of the process.  [Tru64 UNIX]  The pathname
       contains a character with the high-order bit set.  [Tru64 UNIX]	An I/O
       error occurred while reading from or writing to the file	 system.   Too
       many  symbolic  links  were encountered in translating the pathname.  A
       component of a pathname exceeded	 PATH_MAX  characters,	or  an	entire
       pathname	 exceeded  NAME_MAX characters.	 The named file does not exist
       or is an empty string.  A component of the path prefix is not a	direc‐
       tory.  Write access is requested for a file on a read-only file system.

SEE ALSO
       Functions: chmod(2), stat(2) eaccess(3)

       Standards: standards(5)

								     access(2)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net