Tuesday, October 30, 2007
Alfresco: Enabling CIFS in FreeBSD
Alfresco is a Java-based enterprise content management system, and as such it should run on any reasonable platform which supports Java. So, my client wants it installed on a FreeBSD server - no problems, methinks. After all, the Alfresco specifications page lists "Unix" as a supported platform.
And true enough - after various miscellaneous tribulations related to getting Java set up on a remote server in a country on the other side of the globe with a somewhat bandwidth-challenged connection to the outside world, I got the
Alfresco working as expected. Except for one annoying problem: how to enable the built-in CIFS support, which was one of the "killer features" the client was after.
CIFS support is turned on by default and is controlled by an entry in
WEB-INF/classes/alfresco/file-servers.xml (and which can be overridden by a custom configuration file in
tomcat/shared/classes/alfresco/extension/file-servers-custom.xml; configuration information). However, the log file was coming up with this error:
14:34:16,211 ERROR [org.alfresco.smb.protocol] CIFS server configuration error, NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled org.alfresco.error.AlfrescoRuntimeException: NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled
The relevant secton in the
file-servers.xml file looks like this:
<!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux --> <tcpipSMB platforms="linux,solaris,macosx"/> <netBIOSSMB platforms="linux,solaris,macosx"/>
and it would be reasonable to assume the
platforms attribute would need an entry
freebsd or similar so Alfresco will enable TCP/IP SMB. Unfortunately (as of the time of writing) the valid settings don't seem to be documented, and no-one else seems to have encountered the same problem (or at least reported it online). Various trial-and-error settings such as
bsd had no effect, and eventually I had to put the problem on the back burner.
Looking at the problem afresh (and not getting any answer from various forums), I decided to take a look at the section of the source code responsible for parsing the
file-servers.xml, and that revealed that the only acceptable values for
windows. Which isn't very encouraging, but a further look reveals that if the
platforms attribute isn't set at all, no OS checks are made and the TCP/IP SMB service will be started.
So to get Alfresco's CIFS service running under FreeBSD, simply change the
netBIOSSMB settings in
file-servers.xml (or preferably
file-servers-custom.xml) to this:
<!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux --> <tcpipSMB/> <netBIOSSMB/>
Posted at 4:59 PM |Comments (5)