public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Issue when trying to access files on a locked BitLocker volume
@ 2018-04-19 11:38 Vincent Gheur
  2018-04-19 11:44 ` Eliot Moss
  2018-04-19 13:45 ` Corinna Vinschen
  0 siblings, 2 replies; 5+ messages in thread
From: Vincent Gheur @ 2018-04-19 11:38 UTC (permalink / raw)
  To: cygwin

Hi,

I'm using a Bitlocker encrypted SD card, which stays most of the time in my
laptop, but is generally not unlocked. I'm unlocking it only when I need to
access files on it.

I have also a script which is started at regular intervals, which copies
some critical files on the SD card when it is unlocked. I was using till
recently a *very* old version of cygwin (probably downloaded 10 years ago),
in which I could check whether my SD card was unlocked or not by using *if
[ -d <folder-on-SD-card> ]*. I have downloaded a new version of cygwin in
January, as I migrated to Windows 10 and was encountering some issues with
it. Since I upgraded, this test is not working anymore. When the SD card is
unlocked, testing " -d <folder> " returns TRUE. It returns FALSE when I do
the same test on a non Bitlocker volume for a non-existent folder (which is
the expected behaviour).

I guess there are probably other issues related to accessing locked
Bitlocker volumes.


If someone is wanting to solve this, don't hesitate to contact me if you
need more details or if you want me to make tests.


Kind regards,

   Vincent

--
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] 5+ messages in thread

* Re: Issue when trying to access files on a locked BitLocker volume
  2018-04-19 11:38 Issue when trying to access files on a locked BitLocker volume Vincent Gheur
@ 2018-04-19 11:44 ` Eliot Moss
  2018-04-19 13:45 ` Corinna Vinschen
  1 sibling, 0 replies; 5+ messages in thread
From: Eliot Moss @ 2018-04-19 11:44 UTC (permalink / raw)
  To: cygwin

On 4/19/2018 7:38 AM, Vincent Gheur wrote:
> Hi,
> 
> I'm using a Bitlocker encrypted SD card, which stays most of the time in my
> laptop, but is generally not unlocked. I'm unlocking it only when I need to
> access files on it.
> 
> I have also a script which is started at regular intervals, which copies
> some critical files on the SD card when it is unlocked. I was using till
> recently a *very* old version of cygwin (probably downloaded 10 years ago),
> in which I could check whether my SD card was unlocked or not by using *if
> [ -d <folder-on-SD-card> ]*. I have downloaded a new version of cygwin in
> January, as I migrated to Windows 10 and was encountering some issues with
> it. Since I upgraded, this test is not working anymore. When the SD card is
> unlocked, testing " -d <folder> " returns TRUE. It returns FALSE when I do
> the same test on a non Bitlocker volume for a non-existent folder (which is
> the expected behaviour).
> 
> I guess there are probably other issues related to accessing locked
> Bitlocker volumes.
> 
> 
> If someone is wanting to solve this, don't hesitate to contact me if you
> need more details or if you want me to make tests.

I agree that this outcome is strange, but here are some suggestions for
workarounds:

- Test some other property of the same or some other file
- Try some program, such as ls, on the file.  You can direct standard
   output and error to /dev/null and check the result code to see if the
   program failed.
- Try a program that requires write capability, such as touch, if ls does
   not do what you need.

Regards - Eliot Moss

--
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] 5+ messages in thread

* Re: Issue when trying to access files on a locked BitLocker volume
  2018-04-19 11:38 Issue when trying to access files on a locked BitLocker volume Vincent Gheur
  2018-04-19 11:44 ` Eliot Moss
@ 2018-04-19 13:45 ` Corinna Vinschen
  2018-04-19 15:45   ` Brian Inglis
  1 sibling, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2018-04-19 13:45 UTC (permalink / raw)
  To: cygwin

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

On Apr 19 13:38, Vincent Gheur wrote:
> Hi,
> 
> I'm using a Bitlocker encrypted SD card, which stays most of the time in my
> laptop, but is generally not unlocked. I'm unlocking it only when I need to
> access files on it.
> 
> I have also a script which is started at regular intervals, which copies
> some critical files on the SD card when it is unlocked. I was using till
> recently a *very* old version of cygwin (probably downloaded 10 years ago),
> in which I could check whether my SD card was unlocked or not by using *if
> [ -d <folder-on-SD-card> ]*. I have downloaded a new version of cygwin in
> January, as I migrated to Windows 10 and was encountering some issues with
> it. Since I upgraded, this test is not working anymore. When the SD card is
> unlocked, testing " -d <folder> " returns TRUE. It returns FALSE when I do
> the same test on a non Bitlocker volume for a non-existent folder (which is
> the expected behaviour).

I'm not sure I understand.

You're testing with -d <non-existing-folder> if the drive is unlocked?
And you're expecting... what exactly?  The test should return FALSE in
all cases, regardless of the drive being locked or unlocked.

Sure, it sounds wrong if -d <non-existing-folder> returns TRUE, but
I wonder if I misunderstand what you're doing.

Can you rephrase this to make it more clear?

Also, can you create an strace of the wrong behaviour to see if there's
a certain error or NT status code which indicates the problem to be
handled more correctly?


Thanks,
Corinna

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Issue when trying to access files on a locked BitLocker volume
  2018-04-19 13:45 ` Corinna Vinschen
@ 2018-04-19 15:45   ` Brian Inglis
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Inglis @ 2018-04-19 15:45 UTC (permalink / raw)
  To: cygwin

On 2018-04-19 07:45, Corinna Vinschen wrote:
> On Apr 19 13:38, Vincent Gheur wrote:
>> Hi,
>>
>> I'm using a Bitlocker encrypted SD card, which stays most of the time in my
>> laptop, but is generally not unlocked. I'm unlocking it only when I need to
>> access files on it.
>>
>> I have also a script which is started at regular intervals, which copies
>> some critical files on the SD card when it is unlocked. I was using till
>> recently a *very* old version of cygwin (probably downloaded 10 years ago),
>> in which I could check whether my SD card was unlocked or not by using *if
>> [ -d <folder-on-SD-card> ]*. I have downloaded a new version of cygwin in
>> January, as I migrated to Windows 10 and was encountering some issues with
>> it. Since I upgraded, this test is not working anymore. When the SD card is
>> unlocked, testing " -d <folder> " returns TRUE. It returns FALSE when I do
>> the same test on a non Bitlocker volume for a non-existent folder (which is
>> the expected behaviour).
> 
> I'm not sure I understand.
> 
> You're testing with -d <non-existing-folder> if the drive is unlocked?
> And you're expecting... what exactly?  The test should return FALSE in
> all cases, regardless of the drive being locked or unlocked.
> 
> Sure, it sounds wrong if -d <non-existing-folder> returns TRUE, but
> I wonder if I misunderstand what you're doing.
> 
> Can you rephrase this to make it more clear?
> 
> Also, can you create an strace of the wrong behaviour to see if there's
> a certain error or NT status code which indicates the problem to be
> handled more correctly?

ISTM he's saying (badly) he's testing for an *existing* BitLocker folder which
should only be accessible when the volume is unlocked, but current Cygwin
returns that the folder is accessible, even when the volume should be locked.
Sounds like current Windows may be being "helpful" or caching volume info.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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] 5+ messages in thread

* Re: Issue when trying to access files on a locked BitLocker volume
@ 2018-04-19 11:59 Vincent Gheur
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent Gheur @ 2018-04-19 11:59 UTC (permalink / raw)
  To: cygwin

Hi,

There are indeed several workarounds to this issue (this is why I'm not
waiting for a fix), but I thought it was worth mentioning the problem, as I
suspect other incorrect behaviors to be caused by the underlying issue.

Thanks for your answer !

   Vincent


On 19 April 2018 at 13:38, Vincent Gheur <Vincent@gheur.info> wrote:

> Hi,
>
> I'm using a Bitlocker encrypted SD card, which stays most of the time in
> my laptop, but is generally not unlocked. I'm unlocking it only when I need
> to access files on it.
>
> I have also a script which is started at regular intervals, which copies
> some critical files on the SD card when it is unlocked. I was using till
> recently a *very* old version of cygwin (probably downloaded 10 years ago),
> in which I could check whether my SD card was unlocked or not by using *if
> [ -d <folder-on-SD-card> ]*. I have downloaded a new version of cygwin in
> January, as I migrated to Windows 10 and was encountering some issues with
> it. Since I upgraded, this test is not working anymore. When the SD card is
> unlocked, testing " -d <folder> " returns TRUE. It returns FALSE when I do
> the same test on a non Bitlocker volume for a non-existent folder (which is
> the expected behaviour).
>
> I guess there are probably other issues related to accessing locked
> Bitlocker volumes.
>
>
> If someone is wanting to solve this, don't hesitate to contact me if you
> need more details or if you want me to make tests.
>
>
> Kind regards,
>
>    Vincent
>
>

--
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] 5+ messages in thread

end of thread, other threads:[~2018-04-19 15:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 11:38 Issue when trying to access files on a locked BitLocker volume Vincent Gheur
2018-04-19 11:44 ` Eliot Moss
2018-04-19 13:45 ` Corinna Vinschen
2018-04-19 15:45   ` Brian Inglis
2018-04-19 11:59 Vincent Gheur

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