[ -w filename ] returns true when permissions are -r--r--r--

Andrew DeFaria Andrew@DeFaria.com
Fri Jul 22 05:25:00 GMT 2011


On 07/21/11 19:50, Larry Hall (Cygwin) wrote:
> On 7/21/2011 9:07 PM, Andrew DeFaria wrote:
>> I'm seeing the exact same behavior. I see this on my C drive (I cd'ed 
>> to /tmp). The drive is:
>
> Weird.  So what are you using?  XP and Cygwin 1.7.9 or something else?
Yes. At work XP and 1.7.9.

Here at home it's Win 7 (VM) and 1.7.7. Still the same:

Neptune:pwd
/tmp
Neptune:df .
Filesystem           1K-blocks      Used Available Use% Mounted on
C:/cygwin             54604900  19369104  35235796  36% /
Neptune:ll afile
-r--r--r-- 1 andrew None 0 2011-07-21 22:24 afile
Neptune:[ -w afile ] && echo writable || echo not writable
writable
Neptune:echo abc >> afile
Neptune:ll afile
-r--r--r-- 1 andrew None 4 2011-07-21 22:24 afile
Neptune:uname -a
CYGWIN_NT-6.1-WOW64 Neptune 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
Neptune:


-- 
Andrew DeFaria <http://defaria.com>
Why are they called apartments, when they're all stuck together?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list