diff --git a/daemon/open.c b/daemon/open.c index bedd70f..98e207e 100644 --- a/daemon/open.c +++ b/daemon/open.c @@ -254,18 +254,20 @@ static int check_execute_access(nfs41_open_state *state) int status = nfs41_access(state->session, &state->file, ACCESS4_EXECUTE | ACCESS4_READ, &supported, &access); if (status) { - eprintf("nfs41_access() failed with %s\n", nfs_error_string(status)); + eprintf("nfs41_access() failed with %s for %s\n", + nfs_error_string(status), state->path.path); status = ERROR_ACCESS_DENIED; } else if ((supported & ACCESS4_EXECUTE) == 0) { /* server can't verify execute access; * for now, assume that read access is good enough */ if ((supported & ACCESS4_READ) == 0 || (access & ACCESS4_READ) == 0) { eprintf("server can't verify execute access, and user does " - "not have read access\n"); + "not have read access to file %s\n", state->path.path); status = ERROR_ACCESS_DENIED; } } else if ((access & ACCESS4_EXECUTE) == 0) { - eprintf("user does not have execute access to file\n"); + dprintf(1, "user does not have execute access to file %s\n", + state->path.path); status = ERROR_ACCESS_DENIED; } else dprintf(2, "user has execute access to file\n");