I am using JCIFS to write to a Windows share. This is working fine. Suddenly it stopped working, and now I get jcifs.smb.SmbAuthException: access is denied. an exception. I know that my credentials are good, since I can connect using smb manually and write to a folder so that there is no problem. The code I'm using is:
NtlmPasswordAuthentication ntlm = new NtlmPasswordAuthentication(domain, userName, smbPassword);
SmbFile file = new SmbFile(smbPath, ntlm);
SmbFileOutputStream outputStream = new SmbFileOutputStream(file)
outputStream.write(fileContents)
outputStream.close()
It explodes on the line "SmbFileOutputStream outputStream = new SmbFileOutputStream (file)". None of this has changed for several months and is working fine, so I'm not sure why it will stop working. Does anyone have any ideas? I have a complete loss here, as I know that my credentials are good and that I have write access
source
share