List for cgit developers and users
 help / color / mirror / Atom feed
From: cdrice at pobox.com (Charles Dee Rice)
Subject: Permission denied messages sent to webserver error log during scanning
Date: Sat, 13 Dec 2014 20:09:47 +0000 (UTC)	[thread overview]
Message-ID: <335599737.295704.1418501387890.JavaMail.yahoo@jws106139.mail.bf1.yahoo.com> (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


                 reply	other threads:[~2014-12-13 20:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=335599737.295704.1418501387890.JavaMail.yahoo@jws106139.mail.bf1.yahoo.com \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).