delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/08/18:50:38

From: lhall AT rfk DOT com (Larry Hall)
Subject: Re: -w test fails
8 Jan 1999 18:50:38 -0800 :
Message-ID: <3.0.5.32.19990108100826.009add10.cygnus.gnu-win32@pop.ma.ultranet.com>
References: <369569B0 DOT 159D6F54 AT acceleratednetworks DOT com>
Mime-Version: 1.0
To: "Kevin 'No, the -other- one' Bailey" <kevinb AT acceleratednetworks DOT com>,
gnu-win32 AT cygnus DOT com

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 AT rfk DOT 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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019