[jcifs] listFiles() problem - Access denied

Michael B. Allen miallen at eskimo.com
Thu Feb 20 08:32:34 EST 2003


On Wed, 19 Feb 2003 16:34:36 +0200
"Meletis A. Margaritis" <margaritis at ee.upatras.gr> wrote:

> Hello everyone!
>  
> I get the following exception when I execute the SmbFile.listFiles() on
> "smb://myworkgroup/" :
>  
> jcifs.smb.SmbAuthException: Access denied
>  at jcifs.smb.SmbTransport.send(SmbTransport.java:494)
>  at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:126)
>  at jcifs.smb.SmbSession.send(SmbSession.java:102)
>  at jcifs.smb.SmbTree.treeConnect(SmbTree.java:132)
>  at jcifs.smb.SmbFile.connect(SmbFile.java:522)
>  at jcifs.smb.SmbFile.connect0(SmbFile.java:484)
>  at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:460)
>  at jcifs.smb.SmbFile.listFiles(SmbFile.java:1304)
>  at jcifs.smb.SmbFile.listFiles(SmbFile.java:1237)
>  at IPDialog$LanScanner.run(IPDialog.java:882)
>  
> On other workgroups in the same LAN, I dont get this exception, only on
> "myworkgroup".
> I suspect that some server(s) are not accessible, at all, at least
> without a proper authentication.
>  
> I would be very happy if the listFiles() method would return only the
> accessible servers and leave the others out.
> What I mean is, why not get i.e. the 5 out of the 6 servers of
> "myworkgroup" and leave the 1 out?
>  
> Why should "listFiles()" return "ALL" or "NOTHING" ? Why not "SOME" ?

It's just not that sophisticated. One machine is in charge of serving
clients that want to know the hosts in a workgroup (the domain master
browser). It looks like Administrators have chosen to restrict the
broswer service to only certain users. For example the account "GUEST"
is usuallydisabled by default these days. At a minimum you need valid
domain credentials but even then the administrators of the target domain
may restrict access further.

Mike

-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 


More information about the jcifs mailing list