Monthly Archives: May 2016

Samba Client for Windows – smbclient.exe – v3.6.25

So in reference to getting Pydio working on a Windows Server 2012 R2 machine with IIS 8.5 I found that I wanted a workspace in Pydio to access a existing share on a 2012 R2 file server. I have a lot of files I don’t want duplicated on both servers. Now there are many workspace drivers available but since Pydio was designed originally for a *nix system the main way to access a Windows server is through Samba. Windows Server supports SMB, server message blocks, for file sharing among other things. Now on a *nix system you can just install Samba and then Pydio can use the Samba client to remotely access the Windows server. Problem is I want to use Samba on a Windows server to access another Windows server. So I started a hunt to find a ported version of the Samba client and it resulted in two pages out of the millions out there: https://smithii.com/samba which had ported all of Samba v3.0.23 over and https://www.leepa.io/lpackham/smbclient/ which had ported just the v3.0.7 client. So I started testing these clients and long story short they have issues with Windows servers. Mainly you can get directory listings using them and even pull files but you cannot create files nor push files to the Windows file server. After some research its due to changes, mainly security related, in the Windows servers SMB implementation….changes that were fixed in newer versions of Samba (https://www.samba.org/).

So I determined that the only possible way to get my Pydio install to access my existing Windows file server was to either use the FTP over SSH plugin and enable this on my file server, which I didn’t want to do, or figure out a way to compile the Samba client using the latest source. After lots of trail and error I was able to partially compile Samba 3.6.25 using Cygwin (https://www.cygwin.com/) but where it failed was after it had built the smbclient.exe that I needed. I took the client and copied it to the server and tried running it from a command prompt and it complained about needing some Cygwin DLL files which was expected. I copied over the DLL files it needed to the server and was able to connect to the file server. I then updated Pydio to use my newly compiled smbclient.exe and Pydio now works as expected allowing e to share out a existing share from another server. The best part is since user credentials are passed through the existing NTFS permissions still apply on top of Pydios own permission checks.

Not sure if anyone in the world will ever need it but just in case here it is: smbclient.zip. Keep in mind you will need to install Cygwin on the same machine and at the very least copy the DLL files it needs out of C:\cygwin\bin to the directory with the client.

Hosting Your Own Cloud With Pydio

Last year I was looking for a cloud hosting solution and I decided on Pydio and even wrote up a install guide (http://allandynes.com/2015/08/was-searching-for-a-cloud-provider/). Some time has gone by and I’ve updated those instructions for the latest version of Pydio (6.4.1 currently) and also to be a purely 64-bit install (PHP 7 x64, MySql 5.7 x64, etc). The overall effect on a Server 2012 / IIS 8.5 install is quicker performance and less issues with large data syncs. I’ve also updated it to include information on SMB shares so you can access your existing Windows based file server from your cloud server so you are not duplicating files. Here is the new install guide:

Installing-Pydio-on-Windows-Server-2012-R2-Pure-64-bit-With-Samba