unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#55344: ftw thinks readable directories are unreadable if "other" don't have read permission
@ 2022-05-10  0:25 SeerLite via Bug reports for GUILE, GNU's Ubiquitous Extension Language
  2022-05-17 16:03 ` angry rectangle
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: SeerLite via Bug reports for GUILE, GNU's Ubiquitous Extension Language @ 2022-05-10  0:25 UTC (permalink / raw)
  To: 55344

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-13 10:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-10  0:25 bug#55344: ftw thinks readable directories are unreadable if "other" don't have read permission SeerLite via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2022-05-17 16:03 ` 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

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).