From 9f6887bc2029835cfee15c4f1f7a96da37e95e30 Mon Sep 17 00:00:00 2001 From: byshen-dev Date: Sat, 1 May 2021 21:47:51 -0700 Subject: [PATCH] Add a log message when open local directory fails --- cherokee/error_list.py | 4 ++++ cherokee/handler_file.c | 1 + 2 files changed, 5 insertions(+) diff --git a/cherokee/error_list.py b/cherokee/error_list.py index 146c6f90c..5234f5669 100644 --- a/cherokee/error_list.py +++ b/cherokee/error_list.py @@ -221,6 +221,10 @@ e('HANDLER_FILE_TIME_PARSE', title = "Unparseable time '%s'") +e('HANDLER_FILE_OPEN', + title = "Could not open directory ", + desc = "Could not open directory '%s'. Please check the server user and file permissions.") + # cherokee/handler_ssi.c # diff --git a/cherokee/handler_file.c b/cherokee/handler_file.c index 1e002e260..c844bc1d2 100644 --- a/cherokee/handler_file.c +++ b/cherokee/handler_file.c @@ -344,6 +344,7 @@ open_local_directory (cherokee_handler_file_t *fhdl, cherokee_buffer_t *local_fi */ switch (errno) { case EACCES: + LOG_WARNING (CHEROKEE_ERROR_HANDLER_FILE_OPEN, local_file->buf); conn->error_code = http_access_denied; break; case ENOENT: