From: SeerLite via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <bug-guile@gnu.org>
To: 55344@debbugs.gnu.org
Subject: bug#55344: ftw thinks readable directories are unreadable if "other" don't have read permission
Date: Mon, 9 May 2022 20:25:17 -0400 [thread overview]
Message-ID: <19f83bff-144b-f25a-db27-d8f48580897c@nixnet.email> (raw)
ftw incorrectly thinks that if other users don't have the read
permission then the owner can't read it either. This also affects ntfw.
Guile version: 3.0.8
Machine type: x86_64-pc-linux-gnu
guile@3.0.8 from Guix
To reproduce: Create 2 directories, one with rwxrwxrwx permissions and
another with rwxrwx---. Then pass them to ftw and notice it won't
recurse because it thinks they're directory-not-readable.
scheme@(guile-user)> (passwd:uid (getpw (getlogin)))
$1 = 1001
scheme@(guile-user)> (stat:uid (stat "readable-dir"))
$2 = 1001
scheme@(guile-user)> (stat:uid (stat "also-readable-dir"))
$3 = 1001
scheme@(guile-user)> (format #f "~o" (stat:perms (stat "readable-dir")))
$4 = "777"
scheme@(guile-user)> (format #f "~o" (stat:perms (stat
"also-readable-dir")))
$5 = "770"
scheme@(guile-user)> (stat "readable-dir")
$6 = #(24 61374845 16895 1 1001 998 0 0 1652140343 1652140343 1652141421
4096 0 directory 511 216530924 216530924 1652141421)
scheme@(guile-user)> (stat "also-readable-dir")
$7 = #(24 61374847 16888 1 1001 998 0 0 1652140345 1652140345 1652141426
4096 0 directory 504 20542871 20542871 1652141426)
scheme@(guile-user)> (ftw "readable-dir" (lambda (filename statinfo
flag) (display flag) (newline) #t))
directory
$8 = #t
scheme@(guile-user)> (ftw "also-readable-dir" (lambda (filename statinfo
flag) (display flag) (newline) #t))directory-not-readable
$9 = #t
next reply other threads:[~2022-05-10 0:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 0:25 SeerLite via Bug reports for GUILE, GNU's Ubiquitous Extension Language [this message]
2022-05-17 16:03 ` bug#55344: ftw thinks readable directories are unreadable if "other" don't have read permission angry rectangle
2023-03-13 3:38 ` Saad Rhoulam
2023-10-13 10:38 ` bug#55344: getuid and getgid are indeed replaced with compile-time constants wolf
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19f83bff-144b-f25a-db27-d8f48580897c@nixnet.email \
--to=bug-guile@gnu.org \
--cc=55344@debbugs.gnu.org \
--cc=seerlite@nixnet.email \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).