[jcifs] listFiles() problem - Access denied

Christopher R. Hertel crh at ubiqx.mn.org
Thu Feb 20 05:48:54 EST 2003


On Wed, Feb 19, 2003 at 04:34:36PM +0200, Meletis A. Margaritis 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" ?

You need to understand how the protocol works before asking this question.  

The URL "smb://myworkgroup/" indicates a workgroup, not a fileserver or
share or filesystem.  It represents a group of (one or more) fileservers
all offering some sort of SMB services.


-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the jcifs mailing list