Query: access
OS: osf1
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
access(2) System Calls Manual access(2)NAMEaccess - Determines the accessibility of a fileSYNOPSIS#include <unistd.h> int access ( const char *path, int access_mode) ;STANDARDSInterfaces documented on this reference page conform to industry standards as follows: access(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags.PARAMETERSPoints to the file pathname. When the path parameter refers to a symbolic 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.DESCRIPTIONThe 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.RETURN VALUESUpon successful completion, the access() function returns value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error.ERRORSIf 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 ``owner'' 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 process' allocated address space. The pathname contains a char- acter with the high-order bit set. 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 directory. Write access is requested for a file on a read-only file system.RELATED INFORMATIONFunctions: chmod(2), stat(2) Standards: standards(5) delim off access(2)
Related Man Pages |
---|
access(2) - sunos |
access(2) - minix |
access(2) - ultrix |
access(2) - opendarwin |
access(2) - netbsd |
Similar Topics in the Unix Linux Community |
---|
su permission |
rm Permission Denied error |
Permission denied when rm or chmod |
Permission for files in the path |
Permission denied |