Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 11 Mar 2005 15:02:12 -0800 From: Yitzchak Scott-Thoennes To: cygwin AT cygwin DOT com Subject: Re: Problem with the "-r" test in Perl 5.8.6-4 Message-ID: <20050311230211.GA2872@efn.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Organization: bs"d X-IsSubscribed: yes On Thu, Mar 10, 2005 at 08:44:40PM -0500, Igor Pechtchanski wrote: > Hi, > > I'm having trouble with Perl 5.8.6-4 under Cygwin 1.5.12. Some perl > script uses the "-r" test to chech whether a directory is readable. It > fails on the following directory: > > $ perl -e 'exit !(-r $ARGV[0])' /cygdrive/c/Program\ Files/ThinkPad/Utilities && echo "yep" > $ test -r /cygdrive/c/Program\ Files/ThinkPad/Utilities && echo "yep" > yep > $ ls -ld /cygdrive/c/Program\ Files/ThinkPad/Utilities > drwx------+ 2 admin None 0 Aug 16 2004 /cygdrive/c/Program Files/ThinkPad/Utilities/ > $ getfacl /cygdrive/c/Program\ Files/ThinkPad/Utilities > # file: /cygdrive/c/Program Files/ThinkPad/Utilities > # owner: admin > # group: None > user::rwx > group::--- > group:root:rwx > group:SYSTEM:rwx > group:Users:r-x > group:Power Users:rwx > mask:rwx > other:--- > default:user::rwx > default:group:root:rwx > default:group:SYSTEM:rwx > default:group:Users:r-x > default:group:Power Users:rwx > default:mask:rwx > $ > > Is this behavior by design, or does perl actually check ACLs and something > is wrong with my installation? > Igor > P.S. IIUC, this wouldn't have anything to do with traverse checking, even > if it weren't 1.5.12. perldoc -f -r: The interpretation of the file permission operators "-r", "-R", "-w", "-W", "-x", and "-X" is by default based solely on the mode of the file and the uids and gids of the user. There may be other reasons you can't actually read, write, or execute the file. Such reasons may be for example network filesystem access controls, ACLs (access control lists), read-only filesystems, and unrecognized executable formats. You can try the filetest pragma: use filetest 'access'; see perldoc filetest. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/