-w test fails

Larry Hall lhall@rfk.com
Sun Jan 31 23:52:00 GMT 1999


At 06:13 PM 1/7/99 -0800, Kevin 'No, the -other- one' Bailey wrote:
>Hi all,
>
>I've got to be doing something wrong:
>
>~> touch testfile
>~> ls -l testfile
>-rw-r--r--   1 0        Everyone        0 Jan  7 17:50 testfile
>~> if [ -w testfile ] ; then echo "WRITEABLE"; else echo "READONLY"; fi
>READONLY
>~> grep kevinb /etc/passwd
>kevinb::1238:513:Kevin Bailey://server/users/kevinb:/bin/sh
>~> grep Everyone /etc/group
>Everyone::0:
>~> umask
>000
>~> type test
>test is a shell builtin
>
>Any ideas why -w fails ?  I suspect its something in the /etc
>files or my umask but its beyond me.
>
>All other tests that I've tried work (readable, executable, ...)
>
>I'm using bash under B20.1 if that helps.
>
>Thanks,
>krb


Include "ntea" in your CYGWIN environment variable and use 
"chmod +w testfile".  You only get a positive test for write if it is
across the board.  This behavior isn't right from a UNIX perspective
(nor is it right for file creation as you've noticed) but its how things
work now.  See caveats on using the "ntea" setting on FAT partitions in
the mail archives and/or my related message on ntea and chmod.
( http://www.cygnus.com/ml/gnu-win32/1998-Dec/0279.html )


Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      (781) 239-1053
8 Grove Street                          (781) 239-1655 - FAX
Wellesley, MA  02482-7797               http://www.rfk.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list