Annotation of researchv10dc/man/adm/man2/access.2, revision 1.1.1.1

1.1       root        1: .TH ACCESS 2
                      2: .CT 2 dirs file_inq_creat secur
                      3: .SH NAME
                      4: access \(mi determine accessibility of file
                      5: .SH SYNOPSIS
                      6: .nf
                      7: .B int access(name, mode)
                      8: .B char *name;
                      9: .fi
                     10: .SH DESCRIPTION
                     11: .I Access
                     12: checks the given
                     13: file
                     14: .I name
                     15: for accessibility.
                     16: If \fImode\fL&4\fR
                     17: is nonzero,
                     18: read permission is expected;
                     19: if \fImode\fL&2\fR,
                     20: write permission;
                     21: if \fImode\fL&1\fR,
                     22: execute permission.
                     23: If \fImode\fL==0\fR,
                     24: the file merely need exist.
                     25: In any case
                     26: all directories leading to the file
                     27: must permit searches.
                     28: 0 is returned if the desired access is permitted,
                     29: \-1 if not.
                     30: .PP
                     31: Permission is checked
                     32: against the real userid and groupid of the process;
                     33: this call is best used with set-userid and set-groupid programs.
                     34: .PP
                     35: Only access bits are checked.
                     36: A directory may be announced as writable by
                     37: .IR access ,
                     38: but an attempt to open it for writing will fail
                     39: (although files may be created there);
                     40: a file may look executable, but
                     41: .IR exec (2)
                     42: will fail unless it is in proper format.
                     43: .PP
                     44: .SH SEE ALSO
                     45: .IR stat (2)
                     46: .SH DIAGNOSTICS
                     47: .BR EACCES ,
                     48: .BR EFAULT ,
                     49: .BR EIO ,
                     50: .BR ELOOP ,
                     51: .BR ENOENT ,
                     52: .BR ENOTDIR ,
                     53: .BR EROFS ,
                     54: .BR ETXTBSY

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.