
getaccess(1) | getaccess(1) |
NAME
getaccess - list access rights to ®le(s)
SYNOPSIS
getaccess
getaccess
DESCRIPTION
getaccess lists for the speci®ed ®les the effective access rights of the caller (that is, for their effective user ID, effective group ID, and supplementary groups list). By default, the command prints a symbolic representation of the user's access rights to the named ®le: r or - for read/no read, w or - for write/no write, and x or - for execute/no execute (for directories, search/no search), followed by the ®le name.
Options
getaccess recognizes the following options and
This option sets the user ID only. The access check is made with the caller's effective group ID and supplementary group IDs unless
List access for the given group(s) instead of the caller's effective group ID and supplementary groups list. A group can be a known group name, a valid ID number, or @, representing the ®le's group ID. If information about more than one ®le is requested, the value of @ can differ for each.
List access using the caller's real user ID, group ID, and supplementary groups list, | |
| instead of effective ID values. |
List access rights numerically (octal digits 0..7 instead of rwx) for each ®le requested. | |
| The bit values R_OK, W_OK, and X_OK are de®ned in the ®le <unistd.h>. |
Checking access using access control lists is described in acl(5) and aclv(5).
In addition, the write bit is cleared for ®les on
Processes with appropriate privileges have read and write access to all ®les. However, write access is denied for ®les on
To use getaccess successfully, the caller must have search access in every directory component of the path name of the ®le. getaccess veri®es search access ®rst by using the caller's effective IDs, regardless of the user and group IDs speci®ed. This is distinct from the case in which the caller can search the path but the user for whom access is being checked does not have access to the ®le.
Note: a ®le name argument of - has no special meaning (such as standard input) to getaccess.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If LANG is not speci®ed or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, getaccess behaves as if all internationalization variables are set to "C". See environ(5).
RETURN VALUE
getaccess returns one of the following values:
0Successful completion.
1getaccess was invoked incorrectly or encountered an unknown user or group name. An appropriate message is printed to standard error.
− 1 − | Section 1−323 |
g