<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
<div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div>Mike,<br><br>I went ahead and set the system property using System.setProperty() in my dev environment but now I'm seeing the "Access is denied" issue there now.&nbsp; I guess it's kind of a good thing in that I can replicate the issue now... :-P&nbsp; Maybe it was always there but I never noticed before?<br><br>In any case, here's the stack trace...<br><br>jcifs.smb.SmbTransport.checkStatus
 (SmbTransport.java:528)<br>jcifs.smb.SmbTransport.send(SmbTransport.java:645)<br>jcifs.smb.SmbSession.sessionSetup(SmbSession.java:395)<br>jcifs.smb.SmbSession.send(SmbSession.java:224)<br>jcifs.smb.SmbTree.treeConnect(SmbTree.java:176)<br>jcifs.smb.SmbFile.doConnect(SmbFile.java:906)<br>jcifs.smb.SmbFile.connect(SmbFile.java:949)<br>jcifs.smb.SmbFile.connect0(SmbFile.java:875)<br>jcifs.smb.SmbFile.getType(SmbFile.java:1275)<br>jcifs.smb.SmbFile.doEnum(SmbFile.java:1726)<br>jcifs.smb.SmbFile.listFiles(SmbFile.java:1708)<br>jcifs.smb.SmbFile.listFiles(SmbFile.java:1641)<br>com.mycompany.SmbConnection.getListing(SmbConnection.java:437)<br><br>Any other ideas on this?&nbsp; Thanks.<br><br>Brian<br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Michael B Allen
 &lt;ioplex@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Brian Lee &lt;leeb_08@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> jcifs@lists.samba.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, September 2, 2010 9:43:02 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [jcifs] how to use preauthentication to get around "Access is denied" error?<br></font><br>
Hi Brian,<br><br>Try disabling DFS with the property:<br><br>&nbsp; jcifs.smb.client.dfs.disabled = true<br><br>DFS was added after 1.1 and is the sort of thing that might cause a<br>sporadic error if the client only has access rights for some DFS nodes<br>but not all.<br><br>Mike<br><br>On Thu, Sep 2, 2010 at 9:07 AM, Brian Lee &lt;<a rel="nofollow" ymailto="mailto:leeb_08@yahoo.com" target="_blank" href="mailto:leeb_08@yahoo.com">leeb_08@yahoo.com</a>&gt; wrote:<br>&gt; Hi Mike,<br>&gt;<br>&gt; OK thanks for the clarification.<br>&gt;<br>&gt; In that case, what would cause an "Access is denied" error when the<br>&gt; listFiles() method is called?&nbsp; I am instantiating the SmbFile object with<br>&gt; the constructor that takes in a NtlmPasswordAuthentication object.&nbsp; The<br>&gt; version that is giving us issues is 1.3.14.&nbsp; When we revert to an older<br>&gt; version (1.1), the error goes away.&nbsp; The issue isn't a bad<br>&gt;
 username/password; the operation works 95%
 of the time.&nbsp; It's the 30 minute<br>&gt; to 1 hour down time where the "Access is denied" error manifests that we<br>&gt; have every day that's causing us grief.<br>&gt;<br>&gt; I wish I could send you the stack trace but we have limited access to the<br>&gt; deployment environment and we can't replicate the issue in our dev<br>&gt; environment.&nbsp; Again, it's only on the one server that we're using multiple<br>&gt; accounts to log in.&nbsp; We don't have this issue in our dev environment where<br>&gt; we're doing the same thing.<br>&gt;<br>&gt; Thanks again for your help.<br>&gt;<br>&gt; Brian<br>&gt;<br>&gt; ________________________________<br>&gt; From: Michael B Allen &lt;<a rel="nofollow" ymailto="mailto:ioplex@gmail.com" target="_blank" href="mailto:ioplex@gmail.com">ioplex@gmail.com</a>&gt;<br>&gt; To: Brian Lee &lt;<a rel="nofollow" ymailto="mailto:leeb_08@yahoo.com" target="_blank"
 href="mailto:leeb_08@yahoo.com">leeb_08@yahoo.com</a>&gt;<br>&gt; Cc: <a rel="nofollow" ymailto="mailto:jcifs@lists.samba.org" target="_blank" href="mailto:jcifs@lists.samba.org">jcifs@lists.samba.org</a><br>&gt; Sent: Thu, September 2, 2010 2:38:09 AM<br>&gt; Subject: Re: [jcifs] how to use preauthentication to get around "Access is<br>&gt; denied" error?<br>&gt;<br>&gt; Hi Brian,<br>&gt;<br>&gt; The "preauthentication" business was from the HTTP filter which is no<br>&gt; longer used. If you're trying to do CIFS operations, just create an<br>&gt; NtlmPasswordAuthentication object and then use that with various<br>&gt; SmbFile* constructors.<br>&gt;<br>&gt; Mike<br>&gt;<br>&gt; On Wed, Sep 1, 2010 at 11:59 AM, Brian Lee &lt;<a rel="nofollow" ymailto="mailto:leeb_08@yahoo.com" target="_blank" href="mailto:leeb_08@yahoo.com">leeb_08@yahoo.com</a>&gt; wrote:<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; I've got an application that gets file listings on shared
 Windows folders<br>&gt;&gt; using JCIFS.&nbsp; However, there is one particular server that is giving us<br>&gt;&gt; grief.&nbsp; It works 95% of the time but every so often,
 it'll start giving<br>&gt;&gt; "Access is denied" messages for long stretches at a time (half hour plus).<br>&gt;&gt; But then miraculously, the error will clear and things will be working<br>&gt;&gt; smoothly again.<br>&gt;&gt;<br>&gt;&gt; I figured that the issue was due to the Windows Server 2003 domain<br>&gt;&gt; controller issue.&nbsp; We're attempting to authenticate several different<br>&gt;&gt; users<br>&gt;&gt; near simultaneously (the jobs are working from a timer); from my online<br>&gt;&gt; research it appears that the solution is using preauthentication.<br>&gt;&gt; However,<br>&gt;&gt; when I try to find out HOW to do preauthentication, the docs are pretty<br>&gt;&gt; sparse.<br>&gt;&gt;<br>&gt;&gt; What I tried is creating an instance of the NtlmPasswordAuthentication,<br>&gt;&gt; passing in the user credentials and using the SmbFile constructor that<br>&gt;&gt; takes<br>&gt;&gt; that in as a parameter.&nbsp; Unfortunately, we're still
 seeing the same error<br>&gt;&gt; message pop up when I make the call to SmbFile.listFiles() so I must be<br>&gt;&gt; doing it wrong.<br>&gt;&gt;<br>&gt;&gt; Could somebody either explain to me the proper way of doing<br>&gt;&gt; preauthentication or refer me to an example out there?&nbsp; Or is the error<br>&gt;&gt; message a symptom of a completely different problem?&nbsp; Thanks!<br>&gt;&gt;<br>&gt;&gt; Brian<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Michael B Allen<br>&gt; Java Active Directory Integration<br><span>&gt; <a target="_blank" href="http://www.ioplex.com/">http://www.ioplex.com/</a></span><br>&gt;<br>&gt;<br><br><br><br>-- <br>Michael B Allen<br>Java Active Directory Integration<br><a rel="nofollow" target="_blank" href="http://www.ioplex.com/">http://www.ioplex.com/</a><br></div></div>
</div>
</div><br>

      </body></html>