# ACCESS()

Syntax:

Then: N=ACCESS(filename,type)

Version Ref: 4.8

Description:

ACCESS allows you to check whether a file has a particular type of access privilege.

Type is any combination of R=Read, W=Write, and X=Execute permissions.

Return Value
0 if you have all the specified access permissions to the file.

Otherwise, a negative value is returned. This value is the negative of the system error number.

Examples:

Then: pw = access(/etc/passwd,rw)

Note: When running in a setuid environment (as with filePro), ACCESS uses the real user id to determine access permission and not the effective user id. SCO UNIX includes the effective user id, but this function is not available for all *NIX systems. Refer to your *NIX documentation for details.