--- a/libsbutil/sb_exists.c +++ a/libsbutil/sb_exists.c @@ -11,7 +11,7 @@ int sb_exists(int dirfd, const char *pathname, int flags) { struct stat64 buf; - if (faccessat(dirfd, pathname, F_OK, flags) == 0) + if (faccessat(dirfd, pathname, F_OK, flags|AT_EACCESS) == 0) return 0; /* musl's faccessat gives EINVAL when the kernel does not support