lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Cannot 'mv' read-only files on cygwin?


From: Vadim Zeitlin
Subject: Re: [lmi] Cannot 'mv' read-only files on cygwin?
Date: Tue, 6 Mar 2018 01:39:32 +0100

On Mon, 5 Mar 2018 23:37:17 +0000 Greg Chicares <address@hidden> wrote:

GC> Vadim--Does this make any sense to you?

 No, sorry, or not yet, anyhow. I can try reproducing the problem in a
clean VM if you think it's important, but I suspect I might not be able to
do it, if either of my hypotheses below is correct.

[... snip the problem description ...]

GC> In GNU/Linux, the original 'mv' command worked. In cygwin, it
GC> didn't. My hypothesis is that cygwin can't mv a directory that
GC> contains read-only files, due to some underlying rule of the
GC> msw system call it uses. Is that even plausible?

 I don't think so. At least I've never heard about anything like this and I
can't reproduce it.

 OTOH there is a very common problem that can prevent a directory from
being moved, which is that it's used as the current working directory for
some process and I strongly suspect that this might have happened here.
It's difficult to check it now that the directory was moved, but if it
happens again, could you please use the indispensable Process Explorer tool
(https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer)
and do a search for the directory name in it? It would show you all
processes using the given directory, just like lsof(1) would under Unix.

 The only other thing I can think of is that some file(s) under this
directory were locked by antivirus software, which is plausible as it's
supposed to scan any new files, such as these ones. However in this case,
moving the directory should have succeeded after some time, when the virus
scan would have finished, so if you tried, and failed, to move it again
after a sufficiently long time has passed, it would seem to rule out this
explanation.

 I can't think of anything else right now, sorry,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]