Write/upload a file using Samba/JCIFS issue (SmbAuthException: Access is denied)

前端 未结 2 482
孤城傲影
孤城傲影 2021-02-01 10:04

So I\'m trying to write a file from android device to windows shared folder. I\'m using latest version of JCIFS and code which displays available network shares works fine. So I

2条回答
  •  清歌不尽
    2021-02-01 10:36

    OMG!!! Solution was so simple!!! To access network which is not login/password protected and thus doesn't need any authorization is not NtlmPasswordAuthentication.ANONYMOUS BUT it is:

    NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(null, null, null);
    

    damn it wasn't that obvious!

提交回复
热议问题