Mounting Alfresco 4 as a CIFS/SMB Hard drive mount

Posted on Friday, February 10, 2012

 This notes show how to set up a SMB/CIFS server config to enable mounting the Alfresco system like a hard drive.   The alfresco 4.0 wiki page for CIFS set up is 

A web site I gleamed some information from [2] Although it cover alfresco 3.2 most of the information here is still valid.

  • You already have alfresco 4.0 running on a linux system
  • Ubuntu 10.04 server

First you need to edit the file.  I am using a tomcat install located at /opt/tomcat on an Ubuntu box.  The location of your file may be different.

If you have not done any customizations of your alfresco install you may not have an file but a  If so copy this file and name it

        > cd /opt/tomcat/shared/classes
        >    sudo cp

Now edit this file

        >  sudo pico

At the end of the file I added the following CIFS configurations



This will enable the CIFS server.

I am not a cifs expert so I used the following notes from [2] to open ports so that alfresco could be mounted properly.   

These settings are unsafe in a work environment as they are not secure.   They are just meant to get you started with testing then to fix them later.

Edit  /etc/modules

        >    sudo pico /etc/modules

Add this to the end of the file


Now Edit  /etc/ sysctl.conf

        >    sudo pico /etc/sysctl.conf

Uncomment the following line


Run the following commands

        >    sudo iptables -F
        >    sudo iptables -t nat -F
        >    sudo iptables -P INPUT ACCEPT
        >    sudo iptables -P FORWARD ACCEPT
        >    sudo iptables -P OUTPUT ACCEPT
        >    sudo iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-ports 1445
        >    sudo iptables -t nat -A PREROUTING -p tcp --dport 139 -j REDIRECT --to-ports 1139
        >    sudo iptables -t nat -A PREROUTING -p udp --dport 137 -j REDIRECT --to-ports 1137
        >    sudo iptables -t nat -A PREROUTING -p udp --dport 138 -j REDIRECT --to-ports 1138

Save the iptables configuration

        >    sudo iptables-save > /etc/iptables.rules

Edit  /etc/modules

        >    sudo pico /etc/network/interfaces

Add this to the end of the file

pre-up iptables-restore /etc/iptables.rules

Reboot the server.

Once it is up and running you can now mount it like a hard drive.  Below are a few examples on how to mount it.


In this example my alfresco has the IP address

From the Finder select GoàConnect to Server  or just press apple+K

Enter the smb location in my case it is
Click Connect

Enter your alfresco username/password

And click connect

Now it should show up as a mounted hard drive. 

Previews, search, and coverflow work just fine.  You can edit, update, add files. 

Another way to mount the drive is via the command line

        >    cd ~/Desktop
        >    mkdir mountpoint
        >    mount –t smbfs //demo10x13@ mountpoint

Windows 7

In this example my alfresco has the IP address

Open a window explorer then enter the cifs address in the menu bar like so.

Then hit enter

Enter in your alfresco username/password and click OK.

Now you have mounted the drive.

You may notice a


These are used only on the windows system.   If you drag a file that is already in the alfresco drive to _CheckInOut.ext it will check out the file.  _ShowDetails.exe if you drag a file onto it and drop it will open a web page showing the details of the files.    There are methods to remove these from the drives if they are a hinderance.

Here is another way to mount the network drive

Select Computer then click on Map Network Drive

Enter the alfresco server information and click finish

Enter your credentials.

[1]  SMB/CIFS Server Configuration
       Visited 2/2012
 [2]  Installing Alfresco Community Edition 3.2 on Ubuntu Server 9.04
       Visited 2/2012


  1. You mention that the iptables rules you applied are unsafe.

    I do not have experience with iptables. Could you perhaps suggest which lines are 'unsafe' and what would be 'safe' alternatives?


  2. Nice Informative Blog having nice sharing. Thanks for your hints on implementing it. So Simple but so successful. Worked for me, too. Network Drives

  3. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing.

    Hello, I am providing the extender. The extender is a very useful extender. So you visit our and I hope u understand