For any CMS it is very important that it should provide various ways to enable user to access contents which are stored in CMS. Alfresco provide various such protocols like CIFS (Common Internet File System), FTP (File Transfer Protocol), NTFS (New Technology File System) with this protocols it facilitates users to mount alfresco space as their local storage drives which will help users to access them more conveniently.
What is CIFS?
Common Internet File System (CIFS) is a protocol that lets programs make requests for files and services on remote computers on the Internet. CIFS uses the client/server programming model. A client program makes a request of a server program (usually in another computer) for access to a file or to pass a message to a program that runs in the server computer. The server takes the requested action and returns a response.
How it is supported in Alfresco?
Alfresco server includes Java socket-based implementations of the SMB/CIFS protocol that can be used on any platform. For enabling CIFS in alfresco its out-of-the-box settings the CIFS server should start up. You don’t need to do anything special to configure it. If it doesn’t work you can also specify following entries in your alfresco-global.properties file.
There are few potential problems you may face while configuring CIFS based on OS of server on which you have installed Alfresco I have discusses some of those problems and its solutions below.
Issue1 (DNS lookup on window system)
Windows has its own CIFS already configured to existing host. Alfresco CIFS server pretends to be another host with the same name as the host running Alfresco, but with the letter ‘a’ at the end. So if Alfresco is running on host.domain.com, the CIFS server will be at \\hosta
Now it relies on intercepting NetBIOS calls in order to be able to do this. The problem is that new versions of Windows now prefer SMB over TCP to SMB over NetBIOS. This means that it will try to resolve hosta using a DNS lookup. If you ping hosta you’ll find it has the same IP address as the actual host. This means that when trying to resolve \\hosta, Windows 2008 ends up going to the real CIFS port on the host machine.
Solution to this problem is to disable SMB over TCP/IP so that it falls back to SMB over NetBIOS.
In order to get local traffic to do this, you can add a line to C:\Windows\System32\drivers\etc\hosts so that hosta resolves via DNS lookup to a fake IP Address
In order to get other clients to do this, you may have to configure the alfresco server as their DNS server, or use the firewall settings on the alfresco server to block traffic on the SMB over TCP port 445.
All these problems exist because the alfresco server is trying to co-exist with the CIFS server built into Windows. If you run Alfresco on a Linux host that doesn’t have its own CIFS server, you of course won’t have these problems
Issue2 (PORT binding issue on Linux and Solaris)
On linux and Solaris you will face another kind of problem while configuring CIFS the default Alfresco setup must be run using the root user account so that the CIFS server can bind to the privileged ports (TCP 139/445 UDP 137/138) as normal users does not have access to this privilege ports you will face issues if you try to run with normal user.
Configure CIFS serverto run using non-privileged ports and then use firewall rules to forward requests from the privileged ports to the non-privileged ports.
If you notice carful all the ports mentioned are above privileged range of ports.
The firewall rules should then be set up to forward requests in following manner:
- From TCP ports 139/445 to TCP 1140/1444
- From UDP ports 137/138 to UDP 1137/1138
This is how you can use CIFS server of Alfresco to access contents stored in Alfresco with CIFS.