[jcifs] Access Denied

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Wed Jan 30 11:11:48 EST 2002

Chances are you're overlooking a little detail. The fastest/easiest way to determine whats happening is
to trace it with a packet sniffer like Ethereal or Netmon. Of course that assumes you're familiar with
such things. I would just carefully examine your properties file/SMB URL and verify that that domain
user pass is indeed vaild. Your SMB URL should look something like:

[miallen at miallen2 examples]$ java Put smb://rsch\;miallen:foopass@miallen1/temp/zzz.java
945 bytes transfered in 0 seconds at 0Kbytes/sec

You'll notice I escaped the semicolon but I could have just as easily put the whole thing in quotes. Or
you might have properties like:


in which case you could have just used "smb://miallen1/temp/zzz.java". Same theme if you're explicitly
setting properties within your program but I would try the above tests too. Another thing to look out for is
misspelled properties. Otherwise look closely at the permissions on that directory again taking into
account the fact that other clients will fail over to using a GUEST of null account. I think jCIFS does
this too but it might be a slightly different and potentially less successful variation of retrying. Whatever
the case, if you really use the right credentials, I have never seen it fail. Are you using any special
authentication mechanisms on the NT side? Do you have funky characters in the authentication
credentials or path ...etc


> -----Original Message-----
> From:	James Kaufmann [SMTP:james.kaufmann at Covance.Com]
> Sent:	Tuesday, January 29, 2002 9:19 AM
> To:	jcifs at lists.samba.org
> Subject:	[jcifs] Access Denied
> I'm trying to connect from a linux box to an NT share. Currently I'm
> able to list all the folders and files in a given directory on the
> share, but I can not right to the directory using jcifs. The user has
> full rights and I'm able to right to the directory using the  smbclient
> or via network neighborhood in NT. Any ideas what might be causing this
> error?
> -----------------------------------------------------
> Confidentiality Notice: This e-mail transmission 
> may contain confidential or legally privileged 
> information that is intended only for the individual 
> or entity named in the e-mail address. If you are not 
> the intended recipient, you are hereby notified that 
> any disclosure, copying, distribution, or reliance 
> upon the contents of this e-mail is strictly prohibited. 
> If you have received this e-mail transmission in error, 
> please reply to the sender, so that we can arrange 
> for proper delivery, and then please delete the message 
> from your inbox. Thank you.

More information about the jcifs mailing list