delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/20/09:23:30

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <46F27420.1030603@bonhard.uklinux.net>
Date: Thu, 20 Sep 2007 14:22:40 +0100
From: Fergus <fergus AT bonhard DOT uklinux DOT net>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
To: Cygwin ML <cygwin AT cygwin DOT com>
CC: Fergus <fergus AT bonhard DOT uklinux DOT net>
Subject: Re: if [ -w branching: how to spot a locked USB stick
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

A couple of months ago

   http://www.cygwin.com/ml/cygwin/2007-07/msg00313.html

I wondered whether a user could use "if [ -w " branching in Cygwin to 
distinguish a locked stick from an unlocked stick. Apparently the answer 
was No but Corinna identified an easy fix

   http://www.cygwin.com/ml/cygwin/2007-07/msg00335.html

I have recently changed to Vista from XP SP2 and amongst other 
annoyances I now find that "if [ -w " branching breaks when the test 
medium is a CD. (It's now reported as "write-able".)

Can anybody confirm this?

The fact that in Vista the directory c:/Windows is not accessible while 
c:/tmp is accessible seems to be correctly reported. The root c:/ is 
inaccessible in a strange new way, to me ("A required privilege is not 
held by the client" instead of "Access is denied") but in fact the 
output from "if -w /c" suggests, wrongly, that it is write-able.

Can anybody confirm this?

I suppose we could all post our individual experiences about how 
disconcertingly horrible Vista is, and how much it has broken or (seems 
to have) got wrong or how much existing established good stuff it has 
merely rendered in need of fixing. I suppose it would soon get wearisome 
for everybody else but I feel, and am, absolutely de-railed by it. 
Currently I am making much use of the command
   export MY_DIR=`cygpath $LOCALAPPDATA`

Fergus


--
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/

- Raw text -


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