Malte S. Stretz
2002-May-20 16:35 UTC
[Samba] Problems accessing files with (lib)smbclient
Hi! Seems like I need some help with a really awkward problem I stumbled over today. In a remote access solution I developed, a Perl CGI script accesses a Windows NT 4.0 Server through Filesys::SmbClient and thus libsmbclient. Browsing the shares and the directories works perfectly but as soon as I try to get any file, it fails with a "Permission denied", even if I try it with the Administrator account. The installed Samba is version 2.0.7 (SuSE 7.1) but I compiled libsmbclient.so from the 2.2.4 sources. A try with smbclient (2.0.7) on the same machine gives me the following (the same happens with every other file in whichever directory it is): | paul:/var/log/httpd # smbclient //ntserver/Projekte -UAdministrator | added interface ip=192.168.0.99 bcast=192.168.0.255 nmask=255.255.255.0 | added interface ip=127.0.0.254 bcast=127.255.255.255 nmask=255.0.0.0 | Password: | Domain=[KONSTRUKTION] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0] | smb: \> ls |[...] | RIMG0001.JPG 312320 Mon Mar 4 12:54:29 2002 | RIMG0002.JPG 351232 Mon Mar 4 15:36:13 2002 | RIMG0003.JPG 272384 Sat Mar 16 14:56:05 2002 |[...] | 34828 blocks of size 131072. 4437 blocks available | smb: \> get RIMG0001.JPG | getting file RIMG0001.JPG of size 312320 as RIMG0001.JPG Short read when | getting file \RIMG0001.JPG. Only got 0 bytes. | (0 kb/s) (average 0 kb/s) | smb: \> exit On my local installation everything works as it should. I've got Samba 2.2.1a (SuSE 7.3) in combination with a compiled libsmbclient.so 2.2.4. The server I access is a Windows 2000 Professional Workstation. Has anybody an idea, why I can't get any files while it's no problem at all to list the directories (permissions are correct)? Clueless Malte
Malte S. Stretz
2002-May-25 09:51 UTC
[Samba] Problems accessing files with (lib)smbclient
On Tuesday 21 May 2002 01:33 CET I wrote:>[...] > Has anybody an idea, why I can't get any files while it's no problem at > all to list the directories (permissions are correct)?Nobody? Ok, meanwhile I had access to server logs and here's some more data: As soon as I do the get, in the NT system event log the following entry is added (translated from German): | User: --- | Computer: NTSERVER | Event-ID: 2006 | Source: Srv | Type: Error | Category: --- | Description: | | The Server service received an incorrectly formatted request from | \\PAUL. | ("Der Server-Dienst hat eine falsch formatierte Anforderung von \\PAUL | empfangen.") | Data: | 0000: 00 00 34 00 02 00 7c 00 | 0008: 00 00 00 00 d6 07 00 c0 | 0010: 00 00 00 00 01 20 98 c0 | 0018: 00 00 00 00 00 00 00 00 | 0020: 00 00 00 00 00 00 00 00 | 0028: 53 15 00 00 ff 53 4d 42 | 0030: 2e 00 00 00 00 08 01 00 | 0038: 00 00 00 00 00 00 00 00 | 0040: 00 00 00 00 00 08 5a 56 | 0048: 00 08 01 00 0c ff 00 00 | 0050: 00 00 08 00 00 00 00 00 | 0058: 10 00 10 00 So, any ideas now? _Anything_ might be useful. Maybe somebody from the team? This almost looks like a bug. I also did some further searching on the error message and found this [1] and that [2] post, both from more a year ago which got no reply, too. Something like this is mentioned in the Changelog of the SP3 [3]. But the server I'm trying to access got SP6 so this should be fixed. Malte [1]http://lists.samba.org/pipermail/samba/2001-April/056625.html [2]http://samba.cadcamlab.org/lists/samba/Jul2001/msg00097.html [3]http://www.microsoft.com/IntlKB/Germany/support/kb/d34/d34888.htm