delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:content-type | |
:content-transfer-encoding:message-id:date:from:to:subject; q= | |
dns; s=default; b=wnA6oJlUQjRMYEp96oejfZ4GngBb0tOcd5eEKlLCJ3SNJB | |
6rUR5n6BZ4QYb+IUCHPcbUu6CnbulhXOZF+gsK5vBYpIJNFwp067xJCftYrPAJZV | |
n+w4Q7x4nPnJdHaB0FSD04V7s7oNZfTffHrFbq//4zB4amB2zOdwV5uJYwvrc= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:content-type | |
:content-transfer-encoding:message-id:date:from:to:subject; s= | |
default; bh=cALxVNlZtIjJxuFX9tIgJ5E0u3Q=; b=Dgqsq1pDJrtdwNSEeFXq | |
hJoIG3ZUbi/WaObnTho+8uSaLKl96K6rh5qxnNVEIE9ADo9su4i6+9V2T34ruFA/ | |
jd/K/FrgN6aALAuQME0Owy9Xdt0XycesQj305+LaaX6Q8QdADdBOT6PQTzBid/Yy | |
OdF5RfdedxY1ca7a6Yl7wVM= | |
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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_HK_NAME_FM_DR autolearn=ham version=3.3.2 |
X-HELO: | mail-ee0-f43.google.com |
X-Received: | by 10.14.219.4 with SMTP id l4mr2768006eep.94.1386339552948; Fri, 06 Dec 2013 06:19:12 -0800 (PST) |
MIME-Version: | 1.0 |
Message-ID: | <21153.56522.988000.401372@woitok.gmail.com> |
Date: | Fri, 6 Dec 2013 15:18:50 +0100 |
From: | Dr Rainer Woitok <rainer DOT woitok AT gmail DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | Problems with Cygwin symlinks on a TrueCrypt volume |
Greetings, I just happened to stumble over the problem described below. Additional information: - Windows Vista, patched this week. - Cygwin updated this week. - TrueCrypt downloaded and installed this week. First the normal case using the "C:" partition, where everything runs as expected: $ echo $CYGWIN glob:noignorecase proc_retry:10 nodosfilewarning winsymlinks $ pwd /home/Rainer $ ln -s . xx $ ls -nl xx lrwxrwxrwx 1 1002 513 1 2013-12-06 11:36 xx -> . $ rm xx $ ls -nl xx* ls: cannot access xx*: No such file or directory $ Now the weird behaviour on a TrueCrypt volume mounted as "G:" (or "/g/" under Cygwin): $ cd /g $ ln -s . xx $ ls -nl xx lrwxrwxrwx 1 1002 513 1 2013-12-06 11:38 xx -> . $ rm xx* rm: cannot remove `xx': Permission denied $ rm -f xx* rm: cannot remove `xx': Permission denied $ ls -nl xx* lrwxrwxrwx 1 1002 513 1 2013-12-06 11:38 xx -> . $ id uid=1002(Rainer) gid=513(none) groups=513(none),545(user) $ After some pondering I remembered that Cygwin symlinks internally use the DOS ReadOnly attribute -- and sure enough: $ where attrib /c/WINDOWS/system32/attrib $ attrib -r 'g:\xx.lnk' $ rm xx.lnk $ ls -nl xx* ls: cannot access xx*: No such file or directory $ Horray, the symlink is gone. And ordinary files are just the same on TrueCrypt volumes: $ pwd /g $ touch xx $ attrib +r 'g:\xx' $ ls -nl xx -r--------+ 1 1002 513 0 2013-12-06 11:40 xx $ rm xx rm: remove write-protected regular empty file `xx'? y rm: cannot remove `xx': Permission denied $ ls -nl xx -r--------+ 1 1002 513 0 2013-12-06 11:40 xx $ attrib -r 'g:\xx' $ rm xx $ ls -nl xx ls: cannot access xx: No such file or directory $ I really dont't know whether Windows or TrueCrypt is incorrectly inter- preting the DOS ReadOnly attribute, and thus whose fault this is. I would simply suggest to change the code of the "rm" command so it ex- plicitly removes the DOS ReadOnly attribute before it unlinks any ob- ject. Not knowing much about the internals of Cygwin I'm completely unaware whether or not this suggestion would break anything else, but perhaps someone having the necessary insight could shed some light on this. Sincerely Rainer ---------------------------------------------------------------------- | Rainer M Woitok | Phone : (+49 60 93) 487 95 95 | | Kolpingstraße 3 | Mobile: (+49 172) 813 6 831 | | D-63846 Laufach | Mail : Rainer DOT Woitok AT Gmail DOT Com | | Germany | | ---------------------------------------------------------------------- -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |