v7 man page for access

Query: access

OS: v7

Section: 2

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

ACCESS(2)							System Calls Manual							 ACCESS(2)

NAME
access - determine accessibility of file
SYNOPSIS
access(name, mode) char *name;
DESCRIPTION
Access checks the given file name for accessibility according to mode, which is 4 (read), 2 (write) or 1 (execute) or a combination thereof. Specifying mode 0 tests whether the directories leading to the file can be searched and the file exists. An appropriate error indication is returned if name cannot be found or if any of the desired access modes would not be granted. On disal- lowed accesses -1 is returned and the error code is in errno. 0 is returned from successful tests. The user and group IDs with respect to which permission is checked are the real UID and GID of the process, so this call is useful to set- UID programs. Notice that it is only access bits that are checked. A directory may be announced as writable by access, but an attempt to open it for writing will fail (although files may be created there); a file may look executable, but exec will fail unless it is in proper format.
SEE ALSO
stat(2)
ASSEMBLER
(access = 33.) sys access; name; mode ACCESS(2)
Related Man Pages
access(2) - mojave
access(2) - minix
access(2) - suse
access(2) - hpux
access(2) - osf1
Similar Topics in the Unix Linux Community
Script to parse an access-list
Do You Use Your Mobile Phone to Access the Internet?
write() issue during a low level hdd access
Oracle accessing from remote host
Authentication via .htaccess and .htpasswd