diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 18c7dabbae0..b9544b4bacc 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -651,7 +651,9 @@ int find_binary(const char *name, char **ret) { return 0; } - last_error = -errno; + /* PATH entries which we don't have access to are ignored, as per tradition. */ + if (errno != EACCES) + last_error = -errno; } return last_error;