Hello We use several NetApp filers to share files to windows desktops. If I try to access any file of those NetApp filers from Linux via smbget or via Konqueror and kio_slave kio_smb (which uses libsmbclient) I get a 'smbc_open: Not a directory' error. This problem has been reported a long time ago to the kde buglist by other users of NetApp filers (http://bugs.kde.org/show_bug.cgi?id=80833) but is probably more a libsmbclient problem. It seems that the problem lies in the fact, that the NetApp filers insist on leading backslashes for the paths to access and that libsmbclient does not generate this leading backslash when splitting smb:// style urls. I patched the smbc_parse_path() function in libsmbclient.c so that it returns always a leading backslash for the path component: --- libsmbclient.c 2006-08-15 19:27:42.000000000 +0200 +++ libsmbclient.c.orig 2006-08-15 16:04:43.000000000 +0200 @@ -364,8 +364,7 @@ } - /* make sure path starts with '/' by copying also the separator '/' between the share and the path */ - safe_strcpy(path, p - 1, path_len - 1); + safe_strcpy(path, p, path_len - 1); all_string_sub(path, "/", "\\", 0); This patch resolved the described problem. It seems that the problem exists for all Samba 3.0 version. No testing or analysing of Samba 4 has been done. Greetings Stefan Fink
This should be fixed by check-in 18012. Stefan, please test and let me know whether this fixes the problem, since I have no NetApp filer to test against. Derrell
Hello Derrell I've testet your version of the patch. Everything fine and working. Thanks Stefan
Thanks! Closing.
Some asked if Linux cifs client also had this problem - linux cifs client always begins paths with a / or \ (depending on the server) so it should not have had this problem.