I want to connect to an SMB server and browse through its files, and for a given path, to be able to retrieve a list of files and folders, with the names and permissions.
I need to support all SMB dialects, and to be able to do it from my code.
The code would like roughly as follows:
smbClient.connect(serverInfo);
info = smbClient.getShare(shareName);
for(File file : info.getFiles) {
List<permission> permissions = file.getPermissions();
//do something
}
I've tried a few options such as smbj, impacket, nmap, samba but none of them seem to fill my requirements above.
Is there any way to achieve the above, using Java, Python, or any linux CLI which i can call from my Java code?