access.2: Note use of faccessat(2) for checking symbolic link permissions

Reported-by: Reuben Thomas <rrt@sc3d.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2010-10-24 09:40:33 +02:00
parent 1cdb1ec17c
commit 05b9225154
1 changed files with 7 additions and 0 deletions

View File

@ -163,6 +163,13 @@ a safer alternative would be to temporarily switch the process's
effective user ID to the real ID and then call
.BR open (2).)
.PP
.BR access (2)
always dereferences symbolic links.
If you need to check the permissions on a symbolic link, use
.BR faccessat(2)
with the flag
.BR AT_SYMLINK_NOFOLLOW .
.PP
.BR access ()
returns an error if any of the access types in
.I mode