commit 3bd4a6dea08fc977e314877cefed1c6fdd6b1613 from: Omar Polo date: Mon Jul 04 08:25:15 2022 UTC log when it fails to open a file because of permissions commit - df40c9693103d658c826811f613c8a70b3800b75 commit + 3bd4a6dea08fc977e314877cefed1c6fdd6b1613 blob - 73ae7586e9bddbb80ede0b63005f4014e63e2746 blob + 1bf1d175b45bedc6e5e128425f38880eb6459e62 --- ChangeLog +++ ChangeLog @@ -1,4 +1,6 @@ 2022-07-04 Omar Polo + + * server.c (check_path): log when it fails to open a file because of permissions * iri.c (parse_path): allow '@' and ':' in paths blob - 19e97667cd9b70e02f5043eba1649557858040a1 blob + c69c13daee56925c9114387cc7dd917ebab1ebaa --- server.c +++ server.c @@ -335,8 +335,11 @@ check_path(struct client *c, const char *path, int *fd dirfd = vhost_dirfd(c->host, path, &c->loc); log_debug(c, "check_path: strip=%d path=%s original=%s", strip, p, path); - if (*fd == -1 && (*fd = openat(dirfd, p, O_RDONLY)) == -1) + if (*fd == -1 && (*fd = openat(dirfd, p, O_RDONLY)) == -1) { + if (errno == EACCES) + log_info(c, "can't open %s: %s", p, strerror(errno)); return FILE_MISSING; + } if (fstat(*fd, &sb) == -1) { log_notice(c, "failed stat for %s: %s", path, strerror(errno));