logo       

Re: SmbAuthException during makedirs(): msg#00110

network.samba.java

Subject: Re: SmbAuthException during makedirs()

Michael B Allen <mba2000 <at> ioplex.com> writes:

> Well that error is coming from the server so it's legit. Double check your
> credentials.
>
> Mike

I have found a problem with my usage of credentials as you sugguested. It
seems, that specifing the credentails again when creating a new smbfile
for the directory will work. My usage of file.getParent() assumed a
return object of smbfile which inherited credentials was very wrong.
file.getParent() returns simpile string!

Following fails:

NtlmPasswordAuthentication userCred = new NtlmPasswordAuthentication(domain,
username, password);
SmbFile cifsDir = new SmbFile( netPath, userCred);
SmbFile parent = new SmbFile( file.getParent() )
parent.mkdirs(); // <-- Throws exception


Following will work:

NtlmPasswordAuthentication userCred = new NtlmPasswordAuthentication(domain,
username, password);
SmbFile cifsDir = new SmbFile( netPath, userCred);
SmbFile parent = new SmbFile( file.getParent() ), userCred );
parent.mkdirs(); // now works.


Thanks for the pointer to the credentials.






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise