public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Problems with Cygwin symlinks on a TrueCrypt volume
@ 2013-12-19 14:54 Dr Rainer Woitok
  2013-12-19 15:07 ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Dr Rainer Woitok @ 2013-12-19 14:54 UTC (permalink / raw)
  To: Cygwin

Corinna,

On Wed, 11 Dec 2013 14:53:33 +0100 you wrote:

> ...
> Apart from that, there's a chance that this is a problem not related
> to Cygwin's usage of a transaction on a TrueCrypt volume in the first
> place.  Can you try the workaround from
> http://support.microsoft.com/kb/948252 and see if that fixes the issue
> with the release Cygwin DLL 1.7.27?

I  just  did,  I opened   "cmd.exe" :-(ugh)-:,  removed the "*.blf"  and
"*.regtrans-ms" files as  requested,  and then rebooted.  But it did NOT
(repeat _NOT_) solve the problem.   And,  to be honest, any other result
would have greatly  surprised me, because I never  yet did a  System Re-
store on my Windows system and I _CAN_ install  Windows updates and hot-
fixes.  So  I'm again back  to your patched DLL and  it is still working
great ... :-)

Sincerely
 Rainer

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems with Cygwin symlinks on a TrueCrypt volume
  2013-12-19 14:54 Problems with Cygwin symlinks on a TrueCrypt volume Dr Rainer Woitok
@ 2013-12-19 15:07 ` Corinna Vinschen
  0 siblings, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2013-12-19 15:07 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

On Dec 19 15:53, Dr Rainer Woitok wrote:
> Corinna,
> 
> On Wed, 11 Dec 2013 14:53:33 +0100 you wrote:
> 
> > ...
> > Apart from that, there's a chance that this is a problem not related
> > to Cygwin's usage of a transaction on a TrueCrypt volume in the first
> > place.  Can you try the workaround from
> > http://support.microsoft.com/kb/948252 and see if that fixes the issue
> > with the release Cygwin DLL 1.7.27?
> 
> I  just  did,  I opened   "cmd.exe" :-(ugh)-:,  removed the "*.blf"  and
> "*.regtrans-ms" files as  requested,  and then rebooted.  But it did NOT
> (repeat _NOT_) solve the problem.   And,  to be honest, any other result
> would have greatly  surprised me, because I never  yet did a  System Re-
> store on my Windows system and I _CAN_ install  Windows updates and hot-
> fixes.  So  I'm again back  to your patched DLL and  it is still working
> great ... :-)

Thanks for testing and your feedback!  So I take it that I should not
back out the patch again ;)


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems with Cygwin symlinks on a TrueCrypt volume
  2013-12-16  9:34 Dr Rainer Woitok
@ 2013-12-16  9:46 ` Corinna Vinschen
  0 siblings, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2013-12-16  9:46 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

On Dec 16 10:33, Dr Rainer Woitok wrote:
> Corinna,
> 
> On Fri, 13 Dec 2013 14:06:26 +0100 you wrote:
> 
> > ...
> > You just have to put the released Cygwin 1.7.27 DLL back in place,
> > that's all.  I assume you copied it somewhere else for the time being?
> > Just copy it back into place and, if that was not the solution, copy the
> > snapshot DLL over again.
> 
> Well but the FAQ at
> 
>     http://cygwin.com/faq-nochunks.html#faq.setup.snapshots
> 
> tells a more complicated story.

Yes, it does, becasue in the general case that's the better and more
correct way.  I just read my test request and see that I missed asking
you to test only the DLL, because that would have been sufficient here.
Sorry about that.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems with Cygwin symlinks on a TrueCrypt volume
@ 2013-12-16  9:34 Dr Rainer Woitok
  2013-12-16  9:46 ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Dr Rainer Woitok @ 2013-12-16  9:34 UTC (permalink / raw)
  To: Cygwin

Corinna,

On Fri, 13 Dec 2013 14:06:26 +0100 you wrote:

> ...
> You just have to put the released Cygwin 1.7.27 DLL back in place,
> that's all.  I assume you copied it somewhere else for the time being?
> Just copy it back into place and, if that was not the solution, copy the
> snapshot DLL over again.

Well but the FAQ at

    http://cygwin.com/faq-nochunks.html#faq.setup.snapshots

tells a more complicated story.  And yes, of course I have a backup copy
of the stock DLL.

Sincerely
 Rainer

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems with Cygwin symlinks on a TrueCrypt volume
  2013-12-13 12:47 Dr Rainer Woitok
@ 2013-12-13 13:06 ` Corinna Vinschen
  0 siblings, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2013-12-13 13:06 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

On Dec 13 13:47, Dr Rainer Woitok wrote:
> Corinna,
> 
> On Wed, 11 Dec 2013 14:53:33 +0100 you wrote:
> 
> > ...
> > I created a new snapshot with this patch.  Please give the latest
> > snapshot from http://cygwin.com/snapshots/ a try and report back.
> 
> First  time  ever I installed a  Cygwin  snapshot ...  but  it installed
> cleanly.  More important, it solved  the current symlink problem and did
> not yet create new problems!  Thanks Corinna :-)

Thanks for the feedback.

> > Apart from that, there's a chance that this is a problem not related
> > to Cygwin's usage of a transaction on a TrueCrypt volume in the first
> > place.  Can you try the workaround from
> > http://support.microsoft.com/kb/948252 and see if that fixes the issue
> > with the release Cygwin DLL 1.7.27?
> 
> Since according to the Cygwin FAQ this means re-installing Cygwin I have
> to  postpone this for a  few days but I will  test  this nonetheless and
> will report back to the list (now that the list has graceously agreed to
> accept my postings).  But  currently I prefer and  enjoy the new patched
> version :-)

You just have to put the released Cygwin 1.7.27 DLL back in place,
that's all.  I assume you copied it somewhere else for the time being?
Just copy it back into place and, if that was not the solution, copy the
snapshot DLL over again.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems with Cygwin symlinks on a TrueCrypt volume
@ 2013-12-13 12:47 Dr Rainer Woitok
  2013-12-13 13:06 ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Dr Rainer Woitok @ 2013-12-13 12:47 UTC (permalink / raw)
  To: Cygwin

Corinna,

On Wed, 11 Dec 2013 14:53:33 +0100 you wrote:

> ...
> I created a new snapshot with this patch.  Please give the latest
> snapshot from http://cygwin.com/snapshots/ a try and report back.

First  time  ever I installed a  Cygwin  snapshot ...  but  it installed
cleanly.  More important, it solved  the current symlink problem and did
not yet create new problems!  Thanks Corinna :-)

> Apart from that, there's a chance that this is a problem not related
> to Cygwin's usage of a transaction on a TrueCrypt volume in the first
> place.  Can you try the workaround from
> http://support.microsoft.com/kb/948252 and see if that fixes the issue
> with the release Cygwin DLL 1.7.27?

Since according to the Cygwin FAQ this means re-installing Cygwin I have
to  postpone this for a  few days but I will  test  this nonetheless and
will report back to the list (now that the list has graceously agreed to
accept my postings).  But  currently I prefer and  enjoy the new patched
version :-)

Sincerely
 Rainer

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems with Cygwin symlinks on a TrueCrypt volume
  2013-12-06 16:33 ` Corinna Vinschen
@ 2013-12-11 13:53   ` Corinna Vinschen
  0 siblings, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2013-12-11 13:53 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2761 bytes --]

On Dec  6 17:33, Corinna Vinschen wrote:
> On Dec  6 15:18, Dr Rainer Woitok wrote:
> > 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.
> > [...]
> > $ 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 -> .
> > [...]
> > $ attrib -r 'g:\xx.lnk'
> > $ rm xx.lnk
> > $ 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.
> 
> Cygwin's unlink function already removes the R/O attribute if it exists,
> because the OS equivalent to the POSIX unlink function refuses to remove
> files with the R/O attribute set.  I assume there's some weirdness in the
> handling of the R/O attribute in TrueCrypt, but that's just speculation.
> 
> What you can do to help this issue along:  The same as above, but run
> rm under strace:
> 
>   $ strace -o rm.trace rm -f xx
> 
> The -f flag drops the interactive prompt.  I added lots of debug output
> to the unlink functionality over time, so the rm.trace file should
> contain a lot of interesting details as to what's going wrong here.
> Just appand the rm.trace file to your next reply.

Per the strace your sent via PM (NtOpenFile after RtlSetCurrentTransaction
returns with STATUS_RM_NOT_ACTIVE), I created a patch which stops the
transaction if the following NtOpenFile returns with a certain set of
status codes and tries to call NtOpenFile again, outside of a
transaction.

I created a new snapshot with this patch.  Please give the latest
snapshot from http://cygwin.com/snapshots/ a try and report back.

Apart from that, there's a chance that this is a problem not related
to Cygwin's usage of a transaction on a TrueCrypt volume in the first
place.  Can you try the workaround from
http://support.microsoft.com/kb/948252 and see if that fixes the issue
with the release Cygwin DLL 1.7.27?



Thanks,
Corinna


-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems with Cygwin symlinks on a TrueCrypt volume
  2013-12-06 14:19 Dr Rainer Woitok
@ 2013-12-06 16:33 ` Corinna Vinschen
  2013-12-11 13:53   ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2013-12-06 16:33 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]

On Dec  6 15:18, Dr Rainer Woitok wrote:
> 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.
> [...]
> $ 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 -> .
> [...]
> $ attrib -r 'g:\xx.lnk'
> $ rm xx.lnk
> $ 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.

Cygwin's unlink function already removes the R/O attribute if it exists,
because the OS equivalent to the POSIX unlink function refuses to remove
files with the R/O attribute set.  I assume there's some weirdness in the
handling of the R/O attribute in TrueCrypt, but that's just speculation.

What you can do to help this issue along:  The same as above, but run
rm under strace:

  $ strace -o rm.trace rm -f xx

The -f flag drops the interactive prompt.  I added lots of debug output
to the unlink functionality over time, so the rm.trace file should
contain a lot of interesting details as to what's going wrong here.
Just appand the rm.trace file to your next reply.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Problems with Cygwin symlinks on a TrueCrypt volume
@ 2013-12-06 14:19 Dr Rainer Woitok
  2013-12-06 16:33 ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Dr Rainer Woitok @ 2013-12-06 14:19 UTC (permalink / raw)
  To: cygwin

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.Woitok@Gmail.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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-12-19 15:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-19 14:54 Problems with Cygwin symlinks on a TrueCrypt volume Dr Rainer Woitok
2013-12-19 15:07 ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2013-12-16  9:34 Dr Rainer Woitok
2013-12-16  9:46 ` Corinna Vinschen
2013-12-13 12:47 Dr Rainer Woitok
2013-12-13 13:06 ` Corinna Vinschen
2013-12-06 14:19 Dr Rainer Woitok
2013-12-06 16:33 ` Corinna Vinschen
2013-12-11 13:53   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).