Section: Linux Programmer's Manual (3)Updated: 2010-09-10Local indexUp
euidaccess, eaccess - check effective user's permissions for a file
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>int euidaccess(const char *pathname, int mode);int eaccess(const char *pathname, int mode);
checks permissions and existence of the file identified by its argument
performs checks using the real user and group identifiers of the process,
uses the effective identifiers.
is a mask consisting of one or more of
R_OK, W_OK, X_OK and F_OK,
with the same meanings as for
is a synonym for
provided for compatibility with some other systems.
On success (all requested permissions granted), zero is returned.
On error (at least one bit in
asked for a permission that is denied, or some other error occurred),
-1 is returned, and
is set appropriately.