List for cgit developers and users
 help / color / mirror / Atom feed
* Permission denied messages sent to webserver error log during scanning
@ 2014-12-13 20:09 cdrice
  0 siblings, 0 replies; only message in thread
From: cdrice @ 2014-12-13 20:09 UTC (permalink / raw)


As a bit of a suggestion/request, I'd like to recommend a setting or option to ignore permission denied errors during scanning (or at least not send them to stderr / the webserver error log). 

For example: 
Error opening directory /some-directory/lost+found: Permission denied (13) 
Error opening directory /some-directory/private-stuff: Permission denied (13) 

Semantics are debatable -- perhaps rather than ignoring any permission denied errors, it is safer to ignore or exclude certain directory names (i.e. lost+found) or some user-defined list, etc. 

I noticed it while setting up my own scanning and thought I would toss the idea out there for discussion if it hasn't come up before.  For my purposes, I just added a check in scan-tree.c:scan_path() to skip the error message if errno == EACCES, but I certainly don't think that would necessarily be the best approach for everyone.

Maybe a cgitrc variable "scan-ignore-errors" to blanket turn off error messages during scans or something more refined like "scan-ignore-regex" to list a series of expressions to omit from scanning?

- Chuck


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-13 20:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-13 20:09 Permission denied messages sent to webserver error log during scanning cdrice

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).