delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/02/11:08:10

From: dougmc AT comco DOT com (Doug McLaren)
Subject: Re: problems with ls ...
2 Oct 1997 11:08:10 -0700 :
Message-ID: <199710021731.MAA28933.cygnus.gnu-win32@titan.comco.com>
References: <3 DOT 0 DOT 3 DOT 32 DOT 19970930090454 DOT 00974ba0 AT bsa DOT wc DOT mc DOT xerox DOT com>
Mime-Version: 1.0
To: wla AT wc DOT mc DOT xerox DOT com (William L Anderson)
Cc: gnu-win32 AT cygnus DOT com

William L Anderson was tellin' me ...

| OK, riddle me this:
| 
| using cygwin32/b18 ls.exe to list a directory I get
| ls: filex.yyy: Permission denied
| 
| but with either MKSNT ls or UWIN ls I get a listing.
| 
| what gives?

It appears that the cygwin `ls' actually reads the file somewhat to
get some more information.  Under Unix, `ls' stats the file to find
out it's permissions, owner, etc.  But under Windows, all of this
information isn't available just by doing a stat() (does the stat()
call even exist?) ... so I think that cygwin `ls' reads the beginning
of the file to see if it has some special headers (kind of like the
Unix `file' program) to see if it's actually executable.  When it
cannot read the file, you see this `Permission denied' error.

I may be wrong on this, so if I am, correct me :)

-- 
Doug McLaren, dougmc AT comco DOT com
Unsolicited email of a commercial or advertising nature is not welcomed.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019