Re: ls / rm etc return "no such file or directory"

2008-04-24 Thread Tom Hall
On Thu, Aug 09, 2007 at 01:50:59PM -0700, TomL wrote:
> 
> Based on the idea that its a file locking problem, I ran "handle" from
> sysinternals, and it showed up as an open filehandle in an explorer.exe
> process.  I terminated the process, and all is well.
> 
> I don't understand how it got into that state yet, but I'm closer.  Thanks
> for the hints.

You're a lifesaver !

I get these a lot - sometimes several times a day with vim swap files.

It happens when I run vim over an SSH or telnet session and the session
crashes. After that vim gives me its warning whenever I try to edit that
file until I delete swap file, which I can't.

The only advice I could find was to reboot (which is pretty good advice for
running Windows) which gets annoying on bad network days.

Now I can run 'handle', then 'ps', cross ref the PID from cygwin to windows,
and kill vim - much preferable to a reboot.

Thanks.
Tom 

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



Re: ls / rm etc return "no such file or directory"

2007-08-09 Thread TomL

Based on the idea that its a file locking problem, I ran "handle" from
sysinternals, and it showed up as an open filehandle in an explorer.exe
process.  I terminated the process, and all is well.

I don't understand how it got into that state yet, but I'm closer.  Thanks
for the hints.


Warren Young wrote:
> 
> This is likely yet another example of why enabling file locking by 
> default is brain damaged, which is why *ix systems don't do it.
> 

-- 
View this message in context: 
http://www.nabble.com/ls---rm-etc-return-%22no-such-file-or-directory%22-tf4245023.html#a12080525
Sent from the Cygwin Users mailing list archive at Nabble.com.


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



Re: ls / rm etc return "no such file or directory"

2007-08-09 Thread TomL

Files/directories in this mode only occur on the system when created from
within cygwin.  In this instance, it was created by FileUtils::mkdir_p in a
cygwin ruby script.  It went into this mode after attempting to remove it
with FileUtils::rm_rf 

Incidentally, that may be the trick -- there might be something broken in
FileUtils::rm_rf when running on cygwin.  I will refrain from using it.


Warren Young wrote:
> 
> How is this a Cygwin issue if regular Win32 commands give the same
> problems?
> 

-- 
View this message in context: 
http://www.nabble.com/ls---rm-etc-return-%22no-such-file-or-directory%22-tf4245023.html#a12080448
Sent from the Cygwin Users mailing list archive at Nabble.com.


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



Re: ls / rm etc return "no such file or directory"

2007-08-09 Thread Warren Young

TomL wrote:


cmd.exe:
H:\some_dir>rd /s .tmp1732200708091223
.tmp1732200708091223, Are you sure (Y/N)? y
Access is denied.


How is this a Cygwin issue if regular Win32 commands give the same problems?

This is likely yet another example of why enabling file locking by 
default is brain damaged, which is why *ix systems don't do it.


Try rebooting the system.  If that doesn't free up the lock, take it up 
on a more appropriate mailing list.


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



ls / rm etc return "no such file or directory"

2007-08-09 Thread TomL

I've been googling for two hours and I can't find any relevant information on
this.

Can the following be explained, and how can it be resolved?

bash:
$ vdir -d .*
vdir: cannot access .tmp1732200708091223: No such file or directory
drwxr-xr-x 1 xxx Domain Users 0 Aug  9 12:37 .
drwxr-xr-x 1 xxx Domain Users 0 Aug  9 13:02 ..
$ rm .tmp1732200708091223
rm: cannot remove `.tmp1732200708091223': No such file or directory

cmd.exe:
H:\some_dir>rd /s .tmp1732200708091223
.tmp1732200708091223, Are you sure (Y/N)? y
Access is denied.

Similiar attempts to move/rename/delete this rogue directory with Windows
Explorer and every other means fails in a similar way.

I've tried re"mount"ing the volume in cygwin to no avail.  


chycheck -svr output:

Cygwin Configuration Diagnostics
Current System Time: Thu Aug 09 13:25:46 2007

Windows 2003 Server Ver 5.2 Build 3790 Service Pack 2

Running in Terminal Service session

Path:   C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\Program Files\Support Tools\
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Program Files\Intel\DMIX

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 1003(admin)   GID: 512(Domain Admins)
513(Domain Users) 544(Administrators)   555(Remote Desktop
Users)
545(Users)10512(Domain Admins)  10513(Domain Users)
512(Domain Admins)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 1003(admin)   GID: 512(Domain Admins)
513(Domain Users) 544(Administrators)   555(Remote Desktop
Users)
545(Users)10512(Domain Admins)  10513(Domain Users)
512(Domain Admins)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = 'admin'
PWD = '/home/admin'
HOME = '/home/admin'
MAKE_MODE = 'unix'

HOMEPATH = '\Documents and Settings\xxx'
MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man'
APPDATA = 'C:\Documents and Settings\xxx\Application Data'
HOSTNAME = '01'
TERM = 'cygwin'
PROCESSOR_IDENTIFIER = 'x86 Family 15 Model 12 Stepping 0, AuthenticAMD'
WINDIR = 'C:\WINDOWS'
OLDPWD = '/usr/bin'
USERDOMAIN = 'XX'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
TEMP = '/cygdrive/c/DOCUME~1/xxx/LOCALS~1/Temp/2'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
USERNAME = 'admin'
CLUSTERLOG = 'C:\WINDOWS\Cluster\cluster.log'
PROCESSOR_LEVEL = '15'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
JAVA_HOME = 'C:\Program Files\CA\SharedComponents\JRE\1.5.0_04\'
USERPROFILE = 'C:\Documents and Settings\xxx'
CLIENTNAME = 'XXX22'
PS1 = '\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$ '
LOGONSERVER = '\\XX01'
PROCESSOR_ARCHITECTURE = 'x86'
!C: = 'C:\cygwin\bin'
SHLVL = '1'
USERDNSDOMAIN = 'XXX.LOCAL'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
HOMEDRIVE = 'C:'
PROMPT = '$P$G'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
TMP = '/cygdrive/c/DOCUME~1/xxx/LOCALS~1/Temp/2'
SYSTEMROOT = 'C:\WINDOWS'
CVS_RSH = '/bin/ssh'
PROCESSOR_REVISION = '0c00'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:'
PROGRAMFILES = 'C:\Program Files'
NUMBER_OF_PROCESSORS = '1'
SESSIONNAME = 'RDP-Tcp#9'
COMPUTERNAME = 'XX01'
_ = '/usr/bin/cygcheck'
POSIXLY_CORRECT = '1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'C:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/cygdrive/h
  (default) = 'h:'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'C:\cygwin/bin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'C:\cygwin/lib'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd N/AN/A
c:  hd  NTFS 76308Mb  83% CP CS UN PA FC Local Disk
d:  hd  NTFS190778Mb  96% CP CS UN PA FC BIT Data
e:  cd N/AN/A
f:  hd  NTFS381550Mb  48% CP CS UN PA FC Developer
g:  hd  NTFS478741Mb  73% CP CS UN PA FC Backup
h:  hd  NTFS715401Mb  61% CP CS UN PA FC Production
z:  net NTFS476921Mb   2% CP CS UN PA FC 

C:\cygwin  /system  binmode
h: /cygdrive/h  system  binmode
C:\cygwin/bin  /usr/bin system  binmode
C:\cygwin/lib  /usr/lib system  binmode
.  /cygdrivesystem  binmode,cygdrive

Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe