From 05b9225154021725c99d14ba77f6a94287611764 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 24 Oct 2010 09:40:33 +0200 Subject: [PATCH] access.2: Note use of faccessat(2) for checking symbolic link permissions Reported-by: Reuben Thomas Signed-off-by: Michael Kerrisk --- man2/access.2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/man2/access.2 b/man2/access.2 index 0d3bb11e7..bb4a2fdf1 100644 --- a/man2/access.2 +++ b/man2/access.2 @@ -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