Version 2.8

Download of folders in .tar, .tgz and .zip formats.

smbwebclient-2.8.php.gz

13 Comments:

Anonymous said...

I am absolutely pleased for your application (the ZIP feature rocks!).

I'm glad to see that you implement quickly the suggestions (for example, the one I told you about $_SERVER['PHP_SELF']).

More suggestions I have (put them in the TODO list, at least):

- Possibility to download a compressed resource, besides a directory. I mean, if I want to download the folder 'A' from the resource 'R' that serves the server 'S', I can, but I cannot download the whole resource 'R' zipped. Is this possible?
- Translate 'Ok' to Spanish ("Aceptar" like Windows?).
- Create an analog "status bar" like the one present in Windows, that could inform about: number of files/directories in the actual path (indicating also how many hidden files are), the sum of the sizes the selected files (or all the files if none is selected).
- When downloading files (or compressed directories), send the proper HTTP headers to inform the user the total size of the file (now when I download any file with Firefox, it tells me that the size is unknown).
- Convert the "dotdot" image into a submit button (using button tag or input type="image"), so as to allow going up a level on the tree with only a click.

And real bugs I have found:

1) The page is not XHTML valid when a foreign HTML entity is found on the name of the workgroup (for example, the name of my workgroup is "A&R", so this should be replaced by "A&R").
2) These sentences don't appear translated into Spanish (while others do):

- "Rename selected items".
- "Download this folder (zip)".



That's all for today.

Regards,

knocte

3:22 PM  
victor said...

Thanks for your suggestions, knocte.
I will work on them.

9:54 PM  
Anonymous said...

(excuse me for my bad english)

I need access to hide shares (browsable=no)
Would be a edit box to type this share name.

Leandro Lattanzio
(Argentina)

1:28 PM  
Anonymous said...

Something like this is sorely needed in a number of areas (especially schools and not-for-profit organisations who can't afford the commercial products).

Plus the performance is excellent.

Nice work.

I'm also thinking of modifying the web interface (with nice gui things instead of the checkbox, I just don't like list or check boxes). If I manage to get anything done, I'll send you it to see if you can use it (I've never done anything GPL before, so am not sure what to do in this regard).

thanks.

6:55 AM  
der tom said...

I'm the only one with problems with this version?

1.
For downloading a file (*.txt) I have to click twice and not once like in older versions.

2.
If downloading an existing *.gz file, the archive is corrupt.

3.
If clicking a directory after that, smbwebclient tries to download the directory and not to change to this directory. If really downloading it, I have a file with 0 byte with the directory name.

4.
Marking the checkbox of a directory and choosing "download this folder (zip)" tries to download the zipped *.txt file from the first try and not the marked folder.


der tom

6:45 PM  
Jason Philbrook said...

I have a problem where downloading a directory in any method (tar, zip, tgz) results in an empty file. The tgz ends up a 20 byte file which contains the 0 byte tar file. Sorry for posting it here, but did not find any methods for other support.


Apr 1 12:04:53 mexican smbwebclient[4840]: jp[10.0.2.4]: compress
Apr 1 12:04:53 mexican smbwebclient[4840]: jp[10.0.2.4]: smbclient '//127.0.0.1/homes' -Tqc - -U 'jp%****' -d 0 -W 'MEXICAN' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>/dev/null| ( cat - > /tmp/swcZh9m2LL.tar; mkdir /tmp/swcZh9m2LL.zip.$$; cd /tmp/swcZh9m2LL.zip.$$; tar xf /tmp/swcZh9m2LL.tar; zip -r -q /tmp/swcZh9m2LL.zip *; cd ..; rm -rf /tmp/swcZh9m2LL.tar /tmp/swcZh9m2LL.zip.$$; cat /tmp/swcZh9m2LL.zip; rm /tmp/swcZh9m2LL.zip )

THANKS,
Jason

7:13 PM  
der tom said...

Hi Victor,

here the logs for the 4 points in my last post:

1. (two clicks):
With the first click you call smbwebclient with option '-D' for a directory, but I clicked a *.txt file:

Apr 2 14:34:11 test2 smbwebclient[645]: tb[192.168.0.9]: public/libiconv.TXT
Apr 2 14:34:11 test2 smbwebclient[645]: tb[192.168.0.9]: /usr/bin/smbclient '//
TEST2/public' -c 'dir' -D 'libiconv.TXT' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TC
P_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N
2>&1

2. (corrupt *.gz):
Don't know, what the requested libiconv-gettext.tar.gz has to do with a non existent directory libiconv.TXT

Apr 2 14:43:22 test2 smbwebclient[666]: tb[192.168.0.9]: public/libiconv.TXT/libiconv-gettext.tar.gz
Apr 2 14:43:22 test2 smbwebclient[666]: tb[192.168.0.9]: /usr/bin/smbclient '//TEST2/public' -c 'dir' -D 'libiconv.TXT/libiconv-gettext.tar.gz' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>&1
Apr 2 14:43:22 test2 smbwebclient[666]: tb[192.168.0.9]: /usr/bin/smbclient '//TEST2/public' -c 'dir "libiconv-gettext.tar.gz"' -D 'libiconv.TXT' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>&1
Apr 2 14:43:23 test2 smbwebclient[666]: tb[192.168.0.9]: /usr/bin/smbclient '//TEST2/public' -c 'get "libiconv-gettext.tar.gz" - "' -D 'libiconv.TXT' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>/dev/null

3. (change to directory 'webconf'):

smbwebclient tries to download the folder and not to change to.

Apr 2 14:49:18 test2 smbwebclient[370]: tb[192.168.0.9]: public/libiconv.TXT/webconf
Apr 2 14:49:18 test2 smbwebclient[370]: tb[192.168.0.9]: /usr/bin/smbclient '//TEST2/public' -c 'dir' -D 'libiconv.TXT/webconf' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>&1
Apr 2 14:49:18 test2 smbwebclient[370]: tb[192.168.0.9]: /usr/bin/smbclient '//TEST2/public' -c 'dir "webconf"' -D 'libiconv.TXT' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>&1
Apr 2 14:49:19 test2 smbwebclient[370]: tb[192.168.0.9]: /usr/bin/smbclient '//TEST2/public' -c 'get "webconf" - "' -D 'libiconv.TXT' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>/dev/null

4. (download this folder as zip):

The folder 'webconf' was marked.

Apr 2 14:51:37 test2 smbwebclient[369]: tb[192.168.0.9]: compress
Apr 2 14:51:37 test2 smbwebclient[369]: tb[192.168.0.9]: /usr/bin/smbclient '//TEST2/public' -Tqc - 'libiconv.TXT' -U 'tb%****' -d 0 -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>/dev/null| ( cat - > /tmp/swcZeEu6AQ.tar; mkdir /tmp/swcZeEu6AQ.zip.$$; cd /tmp/swcZeEu6AQ.zip.$$; tar xf /tmp/swcZeEu6AQ.tar; zip -r -q /tmp/swcZeEu6AQ.zip *; cd ..; rm -rf /tmp/swcZeEu6AQ.tar /tmp/swcZeEu6AQ.zip.$$; cat /tmp/swcZeEu6AQ.zip; rm /tmp/swcZeEu6AQ.zip )

der tom

2:55 PM  
Iago said...

Hola Victor, con esta versión 2.8 tengo problemas a la hora de listar directorios que contengan tildes, hace un efecto de agrupación extraño... compruebalo tu mismo.

Cuales son los tipos de codificación soportados?

Un saludo. Buen trabajo.

2:47 PM  
Anonymous said...

Felicitaciones por tu herramienta, va muy bien ! no se si ya te lo han pedido, a lo mejor si, pero sino: pedirte que incluyas en una próxima versión la posibilidad de hacer upload de directorios.

Gracias.

Un Saludo

3:51 PM  
Anonymous said...

der tom, you have exactly the same problem as us, about which I have explained exactly why to the creator of this nice application (I am Nicolas HAHN from Smartwave SA company).

This is due to the fact that, apparently with recent samba versions, smbwebclient forget to count correctly the number of directory levels. So, web you are in /1/2/3, smbwebclient thinks it is in 2. The fact we need to click twice on a file to download, is because the first time, it thinks it is really in 3. Then at the second click, it is possible to download th e file. The same thing can happen in the other way: I mean are reallw in the directory /1/2/3, and it thinks it is in 4. In fact, smbwebclient do a mistake of + or - 1, which cause the program to think that a directory is a file to be downloaded when you click on it, or you have to click twice on a reql file to download it. Now, maybe this bug is due to the output of the smbclient which maybe has change in new versions of Samba...

8:30 PM  
der tom said...

The only thing I can see is, that smbwebclient sends a

smbclient '//VMEIS/public' -c 'dir' -D 'testdir/dev.txt' ...

and smbclient cannot change to testdir/dev.txt, because dev.txt is a text file.
Also smbwebclient 2.0.20 is doing this now and this was a version without such errors :(


Apr 12 22:48:02 vmeis smbwebclient[27335]: tb[192.168.0.9]: [/smbclient]
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: public/testdir
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: smbclient '//VMEIS/public' -c 'dir' -D 'testdir' -U 'tb%****' -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>&1
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: [smbclient]
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: Domain=[VMEIS] OS=[Unix] Server=[Samba 3.0.14]
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: . D 0 Tue Apr 12 22:46:28 2005
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: .. D 0 Tue Apr 12 22:46:12 2005
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: dev.txt A 749 Tue Nov 30 22:59:36 2004
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]:
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: 39098 blocks of size 131072. 24469 blocks available
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]:
Apr 12 22:48:04 vmeis smbwebclient[297]: tb[192.168.0.9]: [/smbclient]
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: public/testdir/dev.txt
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: smbclient '//VMEIS/public' -c 'dir' -D 'testdir/dev.txt' -U 'tb%****' -W 'TOMMAIK' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -b 1200 -N 2>&1
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: [smbclient]
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: Domain=[VMEIS] OS=[Unix] Server=[Samba 3.0.14]
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: cd \testdir\dev.txt\: not a directory
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: . D 0 Tue Apr 12 22:46:12 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: .. D 0 Tue Apr 12 22:23:14 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: newversions D 0 Mon Mar 21 02:33:28 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: sic D 0 Tue Nov 23 00:57:46 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: patch3.0.9.txt A 1558 Tue Nov 23 03:11:16 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: sic.tar.gz A 14320417 Tue Nov 23 03:06:02 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: _cupstar A 3333 Sun Nov 16 22:15:24 2003
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: _gstar A 2563 Sun Sep 26 23:24:02 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: _libiconv-gettext-tar A 2081 Tue Nov 2 23:59:06 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: _lprngtar A 3315 Tue Aug 10 22:45:06 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: _sambatar A 3865 Tue Nov 2 23:17:08 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba.tar.gz.info A 1088 Tue Nov 30 22:53:48 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: lprng.tar.gz.info A 534 Tue Nov 30 22:53:36 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: dev.txt A 749 Tue Nov 30 22:59:36 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: od A 30116 Thu Sep 20 07:33:22 2001
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: usb.tar.gz A 3839 Wed Oct 6 20:31:24 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba.txt A 146469 Fri Feb 4 23:17:52 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: libiconv-gettext.tar.gz.info A 927 Sat Dec 11 14:44:20 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: libiconv-gettext.tar.gz 2372227 Sat Dec 11 14:39:44 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: printing-3-0-9.patch A 18768 Sat Dec 11 15:27:58 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-update A 74422 Mon Dec 13 02:34:00 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-update.bak A 74386 Mon Dec 13 02:27:00 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba.sh A 58167 Mon Dec 13 02:39:40 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba.sh.bak A 58168 Mon Dec 13 02:14:28 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: configure A 1177841 Wed Nov 24 12:01:02 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: lprng-edit A 4071 Wed Dec 15 21:41:20 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: cups D 0 Wed Feb 9 23:02:32 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: configure.zip A 103431 Wed Dec 15 20:26:06 2004
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-create-smbpasswd A 3708 Sun Jan 2 21:32:54 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: printing-3-0-10_v2.patch A 20877 Wed Jan 5 20:56:40 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-wins-hook A 5783 Fri Jan 28 00:07:22 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: smbwebclient.php.templ A 70101 Sat Jan 29 18:42:58 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: sambaneu.tar.gz A 6746604 Tue Mar 8 21:45:26 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: printing.c A 73730 Thu Jan 20 21:24:30 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: printing.c.bak 73958 Tue Jan 11 22:23:38 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: testrights A 0 Fri Jan 21 22:19:06 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-netsend A 8454 Wed Jan 26 20:42:42 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-wins-hook-netsend A 1180 Fri Jan 28 00:07:32 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: smbwebclient-2.7.php A 77227 Wed Mar 16 23:08:32 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-list-smbfs A 2193 Tue Mar 29 18:24:50 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: smbwebclient-2.8.php A 77977 Wed Mar 23 05:13:02 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: ghostscript D 0 Sun Mar 6 20:04:18 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-list-workstation A 2150 Tue Mar 29 18:25:32 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: samba-list-user A 2943 Tue Mar 29 18:23:50 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: smbwebclient-2.6.php A 76893 Wed Mar 2 10:47:34 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: smbwebclient-2.5.php A 76616 Thu Feb 17 09:30:32 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: smbwebclient.php A 69953 Thu Jan 27 12:23:00 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: testdir D 0 Tue Apr 12 22:46:28 2005
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]:
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: 39098 blocks of size 131072. 24468 blocks available
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]:
Apr 12 22:48:10 vmeis smbwebclient[297]: tb[192.168.0.9]: [/smbclient]


der tom

11:04 PM  
der tom said...

Hm,

with samba 3.0.11 the functions of smbwebclient 2.8 are ok.
Must really be a different behaviour of smbclient from samba 3.0.13/14 :(

Sorry for blaming smbweclient for that...

Victor, please check smbwebclient with actual samba versions like 3.0.13/3.0.14.

Changes of smbclient from 3.0.11 to 3.0.14 from the samba release notes:

3.0.12:
o Missing files in the output of smbclient -c 'dir' when run
against Windows file servers.
o MS-DFS support added to smbclient.

3.0.13:
o Numerous smbclient bugs when listing directories.
o Failures in smbclient when connecting to a Windows 9x
file server.

Details:

http://us3.samba.org/samba/history/samba-3.0.14.html

der tom

8:10 PM  
Anonymous said...

Hi.

In another ocassion I exposed a problem. When downloadings a file, the smbwebclient.php script added a text to end of the file:

added interface ip=X.X.X.X bcast=X.X.X.X nmask=X.X.X.X
Domain=[MYGROUP] OS=[Unix] Server=[Samba 2.2.7a]
getting file \zzzzz.txt of size 336 as - (328.1 kb/s) (average 328.1 kb/s)

Can it be solved?

Many thanks

5:23 PM  

Post a Comment

<< Home