From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: SeerLite via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" Newsgroups: gmane.lisp.guile.bugs 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 Message-ID: <19f83bff-144b-f25a-db27-d8f48580897c@nixnet.email> Reply-To: SeerLite Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37346"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 To: 55344@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Tue May 10 02:26:14 2022 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noDhd-0009VG-Hw for guile-bugs@m.gmane-mx.org; Tue, 10 May 2022 02:26:14 +0200 Original-Received: from localhost ([::1]:59566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noDhc-0004Db-8F for guile-bugs@m.gmane-mx.org; Mon, 09 May 2022 20:26:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noDhS-0004DT-Ab for bug-guile@gnu.org; Mon, 09 May 2022 20:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noDhS-00089O-0V for bug-guile@gnu.org; Mon, 09 May 2022 20:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noDhR-0005GZ-RM for bug-guile@gnu.org; Mon, 09 May 2022 20:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: SeerLite Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 10 May 2022 00:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55344 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165214233020204 (code B ref -1); Tue, 10 May 2022 00:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 May 2022 00:25:30 +0000 Original-Received: from localhost ([127.0.0.1]:59765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noDgw-0005Fo-3S for submit@debbugs.gnu.org; Mon, 09 May 2022 20:25:30 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noDgu-0005Ff-Ix for submit@debbugs.gnu.org; Mon, 09 May 2022 20:25:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noDgu-0004Bh-DZ for bug-guile@gnu.org; Mon, 09 May 2022 20:25:28 -0400 Original-Received: from mx.nixnet.email ([94.16.121.167]:60510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noDgs-00084x-EI for bug-guile@gnu.org; Mon, 09 May 2022 20:25:28 -0400 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id EED0720026C for ; Mon, 9 May 2022 20:25:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nixnet.email; s=202002021149; t=1652142322; h=from:from:reply-to:subject:subject:to:to:cc; bh=JRNMf+IgCZs43tTDUU7jIre2sftgMeYa8jWZaG6WcFI=; b=Tt3V2JeysP7fJEnQyiFX+vGHYqiM5mPGFv6X392hKsmst6/chx9pRz8yzQT9PTr1wi4ABX Hu2Q72Udt3bazE2VdNHua9inCA8c/e6ptuXWS08Vg+LRNB4K6gDknT8p9mUzeMp/dWVKO4 zFbZBHT9+rX8q6Oj9X56aDTpM2C5xKU= Content-Language: en-US Received-SPF: pass client-ip=94.16.121.167; envelope-from=seerlite@nixnet.email; helo=mx.nixnet.email X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10277 Archived-At: 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