This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: b18: fileaccess LS UNreliable


jbessels wrote:
> 
[snip]
> Observation1: For Bash and Command Line (CLI) is true:
> ls > dummy  is OK.
> ls -l > ../dummy or ls -ptl > ../dummy is OK.
> ls -l > dummy or ls -ptl > dummy gives following error:
> dummy Permission denied. (checked the above for a couple of dirs)
> Conclusion: redirection doesn't work if the file is in the same
> directory.
> Have tried it on WIn95 as well same result. Works fine under Linus
> though, should work !!
> 

Not so fast. NT uses an exclusive locking scheme by deafult. If you pipe
the
ls-results into a file, bash ownes that file. ls sees it, but can't
access it
(because it is locked) and gives an error as result. As long as you
ommit the
-l parm it works ok. The order of access in ls prevents it from being
more verbose. Using a native ls it is able to report at least is size
and date before it encounters the same problem.

> Observation2: Standing in rootdir /
> CLI. Dir pagefile.sys is OK.
> BASH. Dir pagefile.sys is ERROR  (using cygnus dir. cmd)
> BASH. ls pagefile.sys is ERROR.
> CLI.  ls pagefile.sys is ERROR. In all three cases error is --> dir:
> pagefile.sys  No such file or directory.
> Ohter files can be accessed, pagefile is swapfile.
> Conclusion: Under Dos using dir all is OK, using cygnus ls (and possibly
> other ones as well) give error.

Same as before: pagefile.sys is owned by NT itself. It is therefore
locked.
As long as you ommit the -l flag, it works ok.

> Observation3: Standing in rootdir / (have installed SMS)
> dirs SMSdata.dat smslog.dat are allowed to be accessed by the
> adminstrator
> and I'm logged in as adminstrator.
> CLI. dir SMSdata.dat and dir SMSlog.dat is OK.
> CLI + BASH. ls SMSdata.log and ls SMSlog.dat is ERROR --> permission
> denied.
> 

I don't know about SLS internals, but reasoning from the above I say it
is
a service up and running and owning those files?

> obvervation4: This one is beautiful. Standingin /Winnt
> CLI. dir net*.* ==> two files shown, netlogon.chk and network.wri.
> BASH. dir net*.* (cygnus dir) and ls net*.* only show the file
> network.wri.
> NO error is displayed.
> BASH ls -l net*.*. only shows network.wri and no error.
> BASH ls -l net*.* | head -5 gives networ.wri and sometimes the error
> "ls:
> netlogon.chk. permission denied."

I'm still running NT3.51 and I don't have these files, but I suspect an
instance of the above mentioned mechanism.

> 
> I've tried to be as accurate as possible, but maybe a mistake has
> slipped
> in. My conclusion is. Cygnus-gnuwin32 seems nice, pipes et al works like
> as
> charm just like all commands BUT I can't trust Cygnus-gnuwin32 because
> sometimes not al files are shown or aren't handled correctly. This makes
> it
> totally unusable for me. Am I doing something wrong here or..... I've
> tried
> to download coolview (november version) but that site is so unbelievable
> 
> slow I can't download coolview at all. If someone could send me the
> LATEST
> coolview version this would be much appreciated.
> 

If you like, I can sent it to you by email.

> OK guys, I'm completely lost here. I don't know whats going on. Most
> examples can be tried by everone. I'm very interested if you can
> reproduce
> my errors. Please let me know....
[snap]

HTH,
-- 
Pieter J. Kersten
Erasmus Universiteit Rotterdam
dir. I&A/I&S, WH2-10
Postbus 1738
3000 DR  Rotterdam
Nederland
Tel +31-10-4082599
Fax +31-10-4527236
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]