log web access error to error.log #52
Costa Tsaousis (ktsaou) committed
Jan 31, 2016 at 18:52 UTC
c512fbe69e7ba6cf2b6598fb94c2dd43d2af9d5b
1 file changed
+2
-2
src/web_client.c
+2
-2
@@ -294,7 +294,7 @@ int mysendfile(struct web_client *w, char *filename)
294
295
// check if the file is owned by us
296
if(stat.st_uid != web_files_uid()) {
297
- debug(D_WEB_CLIENT_ACCESS, "%llu: File '%s' is owned by user %d (I run as user %d). Access Denied.", w->id, webfilename, stat.st_uid, getuid());
297
+ error("%llu: File '%s' is owned by user %d (I run as user %d). Access Denied.", w->id, webfilename, stat.st_uid, getuid());
298
buffer_sprintf(w->response.data, "Access to file '%s' is not permitted.", filename);
299
return 403;
300
}
@@ -305,7 +305,7 @@ int mysendfile(struct web_client *w, char *filename)
305
}
306
307
if((stat.st_mode & S_IFMT) != S_IFREG) {
308
- debug(D_WEB_CLIENT_ACCESS, "%llu: File '%s' is not a regular file. Access Denied.", w->id, webfilename);
308
+ error("%llu: File '%s' is not a regular file. Access Denied.", w->id, webfilename);
309
buffer_sprintf(w->response.data, "Access to file '%s' is not permitted.", filename);
310
return 403;
311
}