directory listing differences

Joseph Michaud jmichaud@sgi.com
Thu Jun 7 15:46:00 GMT 2007


Shankar Unni wrote:
> Joseph Michaud wrote:
> 
>         Administrator@HeadNode /cygdrive/c/windows/system32
>         $ ls -al tsdiscon.exe tsecimp.exe
>         ls: cannot access tsdiscon.exe: No such file or directory
> 
> 
> That's probably because the file is exclusively locked, and the "stat" performed by "ls" fails.
> 
> See if you see the file if you pass in the "-f" option to ls:
> 
> $ ls -f tsdiscon.exe tsecimp.exe
> 
> If you can, then this is the issue. Looks like CMD.EXE is able to examine whatever it needs from such files, but stat() in the cygwin library cannot (uses different APIs).
> 
> I see similar behavior in a file that PointSec drops in my C:\\ (PROT_INS.SYS). In fact, even "ls -f" is not able to get any info on that file!
> 
> % cmd /c dir /AH c:\\prot_ins.sys
>  Volume in drive C has no label.
>  Volume Serial Number is A8B1-8402
> 
> 
> Directory of c:\
> 
> 03/22/2007  11:03 AM         2,097,152 PROT_INS.SYS
>                1 File(s)      2,097,152 bytes
>                0 Dir(s)   4,296,351,744 bytes free
> 
> 
> % ls -ln c:\\prot_ins.sys
> ls: cannot access c:\prot_ins.sys: Input/Output error
> % ls -f c:\\prot_ins.sys
> ls: cannot access c:\prot_ins.sys: Input/Output error

Nope, that's not quite it for me.  I try "ls -f" but still don't see
the file.

One interesting tidbit is that if, from the bash shell, I invoke
a Windows CMD shell, then that CMD shell similarly doesn't see the
file.

I conclude from this that somehow the bash shell doesn't have
some appropriate privilege and that bash's children similarly
lack this privilege, but I can't figure out why two files with
seemingly similar permissions are different.

I note that I see this problem on a Windows 2003 Compute Cluster Server
domain controller head node (and its compute nodes) but not
not on a Windows XP 64 laptop.  (Perhaps something with domain
controller security policy is affecting this...)

Any tips on what other info I can look for would help.

Thanks.

Joe

-- 
------------------------------------------------------------------------
Joseph Michaud - SGI Apps Eng  978-562-8808  x483-8808  jmichaud@sgi.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/



More information about the Cygwin mailing list