[jcifs] Problem to mount read-only share from EMC fileserver

Michael B Allen miallen at ioplex.com
Tue Apr 15 15:57:34 GMT 2008


On Tue, 15 Apr 2008 15:48:50 +0200
James Ytterstene <james.ytterstene at mdh.se> wrote:

> Hello
> 
> I try to use jcifs to mount a share from our EMC Celerra NAS gateway. The
> user who is trying to mount has read-only access on share level. I then get
> a Access is denied when I try to list the files on that share. 
> If I add more share permissions (execute) the mount works perfekt and I can
> list the files.
> If I make the same test against a Windows 2003 R2 server I can mount the
> share and list the files, so there is some difference in how the answer is
> handled in jcifs.
> I can mount the share from windows without any problems from both
> environments.
> 
> The test I make is.
> 
> ----
> 1. String startpath = "smb://XXX.XXX.XXX.XXX/Sharetest/
> 2. NtlmPasswordAuthentication ntlm = new
> NtlmPasswordAuthentication(domain,username,password);
> 3. SmbFile dir = new SmbFile( startpath, ntlm );
> 4. SmbFile[] files = dir.listFiles();
> ----
> 
> When I do the last line (listFiles) I get the following error back
> 
> jcifs.smb.SmbAuthException: Access is denied.
> 	at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:503)
> 	at jcifs.smb.SmbTransport.send(SmbTransport.java:614)
> 	at jcifs.smb.SmbSession.send(SmbSession.java:239)
> 	at jcifs.smb.SmbTree.send(SmbTree.java:109)
> 	at jcifs.smb.SmbFile.send(SmbFile.java:693)
> 	at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1847)
> 	at jcifs.smb.SmbFile.list(SmbFile.java:1598)
> 	at jcifs.smb.SmbFile.list(SmbFile.java:1478)
> 	at cifstest.cifstest.main(cifstest.java:53)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> 
> Is there anyone who can help me with this ? I can do more debug tests if you
> want more.

Hi James,

Can you please get two captures:

 1) Windows client (e.g. XP) successfully listing the target read-only share
 2) JCIFS failing to list the same target share.

JCIFS and Windows should be identical so apparently that is not the
case (or Windows trying and failing as well and falling back to trying
something else).

I'll compare the two captures side-by-side and see if I can figure out
what the problem is.

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/


More information about the jcifs mailing list