[jcifs] Problem mkdirs with NtlmPasswordAuthentication
Peter Bos
peter.bos at infoco.be
Wed Feb 4 10:29:41 GMT 2004
Hi,
I'm having some problems creating new subfolders using the mkdirs()-method
from SmbFile. I'm using version 0.7.15 of jCifs.
I want to create a series of subfolders, but it throws a SmbAuthexception
when using the
NtlmPasswordAuthentication-class for creating a SmbFile
Code that doesn't work :
SmbFile tempLocationFile = new SmbFile("smb://sv00268/pbsm359$/idoc/temp",
new NtlmPasswordAuthentication("ADMIN", "pbsm359", "myPassw"));
if (!tempLocationFile.exists()) {
tempLocationFile.mkdirs();
}
Code that does work :
SmbFile tempLocationFile = new
SmbFile("smb://pbsm359:myPassw@sv00268/pbsm359$/idoc/temp");
if (!tempLocationFile.exists()) {
tempLocationFile.mkdirs();
}
When using the mkdir() method it works in both cases, but I have to write a
recursive method to make all the folders. I also want to continue working
with an NtlmPasswordAuthentication, because it's an easy way of
encapsulating the user and password.
Is this a known problem ? Does anyone have a solution ?
Regards,
Peter
More information about the jcifs
mailing list