How to install iFolder on Ubuntu server

ifolder_icon_bigFor a long time, I always searched for a synchronizing solution that just works. Sure, there is Unison, but its interface is a little rough. And it is not developed anymore. You can try rsync, but it is one way only (if you want two ways, you’ll have to do it yourself). Recently, things like DropBox and Ubuntu One are a great step forward. But their free version are quite limited in space. Plus, I like to have my data on my server, not just ‘somewhere in the cloud’. Fortunately, recently Novell released a new version of iFolder. Seemed like the perfect solution, so I thought I’d give it a shot.

Of course, the first requirement for this tutorial is that you have your own server. Either a dedicated or a shared one, or some computer in your garage, but you must have root access to it.

Update

You can also refer to this page: https://help.ubuntu.com/community/iFolderInstall

There is also a google groupe dedicated to this: http://groups.google.com/group/ifolder-ubuntu-debian-dev

Update

There is now a guide to compile with 9.10 (and possiblity 10.04) and 3.8 simias. It should be straightforward, but if you have questions, ask !

Resources

https://help.ubuntu.com/community/ModMono
https://help.ubuntu.com/community/iFolderEnterpriseServer
https://wiki.ubuntu.com/iFolderPackaging
http://www.thesummit-grp.com/index.php/matts-blog-right-menu-12/37-ifolder-37-on-sled-11
http://community.ifolder.com/ssf/a/do?p_name=ss_forum&p_action=1&title=installation&binderId=1487&action=view_folder_entry&page_title=Installation
https://edge.launchpad.net/~ruiboon

vikholt has adapted the steps to work with debian lenny. You can read his tutorial here:

https://trac-git.assembla.com/unifolder/wiki/InstallingIFolderServerOnDebianLenny

Requirements

  • First, you must have a up-to-date Ubuntu server. I installed iFolder on ubuntu server 9.04 and 9.10, I think it should also work with server 8.10 and desktop 9.04. However in the case of 8.10, the dependencies may be a little bit different.
  • Also, you must have apache installed and configured to work with ssl to have the windows client to work. You can quickly enable it with:
    sudo a2enmod ssl
    sudo a2ensite default-ssl
  • That’s all

Steps Simias 3.8 for 9.10 from source

Start in an empty folder, for example ~/ifolderinstall

  1. Install the dependencies
    sudo apt-get install build-essential automake autoconf mono-complete liblog4net1.2-cil uuid-dev libxml2-dev mono-apache-server mono-apache-server2 gsoap libapache2-mod-mono libncurses-dev libtool g++-4.3 gcc-4.3
  2. Install flaim
    On my 9.10 64 bit machine, libflaim and libflaim-dev were not available. If you can install them with apt-get, install them. Else, compile them as follow:
    wget http://downloads.sourceforge.net/project/flaim/stable/flaim/source/libflaim-4.9.845.tar.gz?use_mirror=freefr -O - | tar -xzf -
    cd libflaim-4.9.845/
    sed -i "s/\-Werror//" Makefile
    make
    sudo make install
  3. Get the simias source from sourceforge:
    wget http://sourceforge.net/projects/ifolder/files/iFolder%20Clients/3.8.0/simias-1.8.3.9328.1.tar.gz/download -O - | tar -xzf -
    cd simias-1.8.3.9328.1/
  4. Define some compilations flags. Very important : you must compile it with gcc4.3, else it will crash on run ! The fault is in FlaimWrapper, but until there is a bugfix, compile it with gcc4.3 !
    export CSC_LIBFLAG="/target:library"
    export WSDL=wsdl2
    export CSC2="gmcs /d:MONO /d:MONONATIVE"
    export CSC="gmcs /d:MONO /d:MONONATIVE"
    export MONO=mono
    export CC=gcc-4.3
    export CXX=g++-4.3
  5. Fix a problem with gsoap:
    sed -i -e "s+\$(GSOAP_PATH)/wsdl2h+wsdl2h+g" -e "s+\$(GSOAP_PATH)/soapcpp2+soapcpp2+g" -e "s+\$(GSOAP_PATH)/stdsoap2.c+/usr/include/gsoap/stdsoap2.c+g" -e "s+\$(GSOAP_PATH)/stdsoap2.h+/usr/include/stdsoap2.h+g" src/core/libsimias/Makefile.am
  6. Compile it:
    ./autogen.sh --prefix=/usr
    make
    sudo make install
  7. Run the Simias server setup:
    sudo /usr/bin/simias-server-setup
    enter these for answers (most are default, take care of apache user and group):

    SIMIAS SERVER SETUP
    This script configures a server installation of Simias to setup a new Simias system.
    ----- SERVER'S DATA PATH -----
    Path to the server's data files
    Server's Data Path? [/var/simias/data]:
    ----- SERVER NAME -----
    The name of this server
    Server Name? [Host1]: iFolder
    ----- SSL -----
    Select SSL/NONSSL communication for this server. Options
    are SSL, NONSSL or BOTH
    SSL? [SSL]:
    ----- PUBLIC URL -----
    Public URL of this Simias Server
    Public URL? [https://127.0.1.1/simias10]: https://yourserver.com/simias10
    ----- PRIVATE URL -----
    Private URL of this Simias Server
    Private URL? [https://yourserver.com/simias10]:
    ----- SLAVE SERVER -----
    Install into existing Simias Domain
    Slave Server? [N]:
    ----- SYSTEM NAME -----
    A name used to identify the Simias system to users.
    System Name? [iFolder]:
    ----- SYSTEM DESCRIPTION -----
    A detailed description of the Simias system for users.
    System Description? [iFolder Enterprise System]:
    ----- USE KEY RECOVERY AGENT -----
    Use Key Recovery Agents to recovery the encryption
    key if the user forgets the pass-phrase used for encryption?
    Use Key Recovery Agent? [Y]:
    ----- RECOVERY AGENT CERTIFICATE PATH -----
    Path to the Recovery agent certificate's.
    Recovery Agent Certificate Path? [/var/simias/data]:
    ----- USE LDAP -----
    Use LDAP to provision and authenticate users?
    Use LDAP? [Y]: N
    ----- SYSTEM ADMIN -----
    The Simias default administrator. If the system is
    configured to use an external identity source, the
    distinguished name (dn) should be used.
    System Admin? [admin]:
    System Admin Password? [novell]:
    ----- CONFIGURE APACHE -----
    Configure Simias to run behind Apache
    Configure Apache? [N]: Y
    ----- APACHE USER -----
    Apache User
    Apache User? [wwwrun]: www-data
    ----- APACHE GROUP -----
    Apache Group
    Apache Group? [www]: www-data
    Working...
    Configuring /var/simias/data/simias/Simias.config...SetupSimias - Done
    Configuring /etc/apache2/conf.d/simias.conf...Done
    Configuring User Movement plugin..
    Setting up Log4Net file...Done
    Setting up permissions...Done
    SUCCESS
  8. Correct the mod_mono path:
    sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/simias.conf
  9. Fix some permissions and paths:
    sudo mkdir -p /var/www/.config/.mono/
    sudo chown -R www-data:www-data /var/www/.config/
  10. Restart apache and verify it is still restarting (it should :) ):
    sudo /etc/init.d/apache2 restart
  11. Run the setups for ifolder (answers are default):
    sudo /usr/bin/ifolder-admin-setup
    sudo /usr/bin/ifolder-web-setup

    Put the following answers to apache:
    Apache User? [wwwrun]: www-data
    Apache Group? [www]: www-data
  12. Correct again mod_mono path:
    sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/ifolder_admin.conf
    sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/ifolder_web.conf
  13. Enable rewrite:
    sudo a2enmod rewrite
  14. Restart apache:
    sudo /etc/init.d/apache2 restart
  15. Go to https://yourserver.com/admin , create a user, and enjoy !

Steps for 9.04 with rpms
Start in an empty folder, for example ~/ifolderinstall

  1. Download the different packages:
    wget http://downloads.sourceforge.net/ifolder3/ifolder3-enterprise-3.7.2.9089.1-0.2.i586.rpm
    wget http://downloads.sourceforge.net/ifolder3/ifolder-enterprise-plugins-3.7.2.9089.1-2.i586.rpm
    wget http://download.opensuse.org/distribution/10.3/repo/oss/suse/noarch/log4net-1.2.9-104.noarch.rpm
  2. Install alien and convert the packages:
    sudo apt-get install alien
    sudo alien --scripts *.rpm
  3. Install the packages:
    sudo dpkg -i ifolder3-enterprise_3.7.2.9089.1-1.2_i386.deb
    sudo dpkg -i ifolder-enterprise-plugins_3.7.2.9089.1-3_i386.deb
  4. Install the dependencies:
    sudo apt-get install mono-1.0-runtime mono-2.0-runtime mono-apache-server mono-apache-server2 libapache2-mod-mono libmono-system-web1.0-cil
  5. You must install a special version of log4net:
    sudo apt-get remove liblog4net1.2-cil
    sudo dpkg -i log4net_1.2.9-105_all.deb
  6. Restart apache and verify everything is still working (it should):
    sudo /etc/init.d/apache2 restart
  7. Run the Simias server setup:
    sudo /usr/bin/simias-server-setup
    enter these for answers (most are default, take care of apache user and group):

    SIMIAS SERVER SETUP
    This script configures a server installation of Simias to setup a new Simias system.
    ----- SERVER'S DATA PATH -----
    Path to the server's data files
    Server's Data Path? [/var/simias/data]:
    ----- SERVER NAME -----
    The name of this server
    Server Name? [Host1]: iFolder
    ----- SSL -----
    Select SSL/NONSSL communication for this server. Options
    are SSL, NONSSL or BOTH
    SSL? [SSL]:
    ----- PUBLIC URL -----
    Public URL of this Simias Server
    Public URL? [https://127.0.1.1/simias10]: https://yourserver.com/simias10
    ----- PRIVATE URL -----
    Private URL of this Simias Server
    Private URL? [https://yourserver.com/simias10]:
    ----- SLAVE SERVER -----
    Install into existing Simias Domain
    Slave Server? [N]:
    ----- SYSTEM NAME -----
    A name used to identify the Simias system to users.
    System Name? [iFolder]:
    ----- SYSTEM DESCRIPTION -----
    A detailed description of the Simias system for users.
    System Description? [iFolder Enterprise System]:
    ----- USE KEY RECOVERY AGENT -----
    Use Key Recovery Agents to recovery the encryption
    key if the user forgets the pass-phrase used for encryption?
    Use Key Recovery Agent? [Y]:
    ----- RECOVERY AGENT CERTIFICATE PATH -----
    Path to the Recovery agent certificate's.
    Recovery Agent Certificate Path? [/var/simias/data]:
    ----- USE LDAP -----
    Use LDAP to provision and authenticate users?
    Use LDAP? [Y]: N
    ----- SYSTEM ADMIN -----
    The Simias default administrator. If the system is
    configured to use an external identity source, the
    distinguished name (dn) should be used.
    System Admin? [admin]:
    System Admin Password? [novell]:
    ----- CONFIGURE APACHE -----
    Configure Simias to run behind Apache
    Configure Apache? [N]: Y
    ----- APACHE USER -----
    Apache User
    Apache User? [wwwrun]: www-data
    ----- APACHE GROUP -----
    Apache Group
    Apache Group? [www]: www-data
    Working...
    Configuring /var/simias/data/simias/Simias.config...SetupSimias - Done
    Configuring /etc/apache2/conf.d/simias.conf...Done
    Configuring User Movement plugin..
    Setting up Log4Net file...Done
    Setting up permissions...Done
    SUCCESS
  8. Correct the mod_mono path:
    sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/simias.conf
  9. Fix some paths:
    sudo ln -s /usr/bin/gmcs2 /usr/bin/gmcs
    sudo mkdir -p /var/www/.config/.mono/
    sudo chown -R www-data:www-data /var/www/.config/
  10. Restart apache and verify it is still restarting (it should :) ):
    sudo /etc/init.d/apache2 restart
  11. Run the setups for ifolder (answers are default):
    sudo /usr/bin/ifolder-admin-setup
    sudo /usr/bin/ifolder-web-setup

    Put the following answers to apache:
    Apache User? [wwwrun]: www-data
    Apache Group? [www]: www-data
  12. Correct again mod_mono path:
    sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/ifolder_admin.conf
    sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/ifolder_web.conf
  13. Enable rewrite:
    sudo a2enmod rewrite
  14. Restart apache:
    sudo /etc/init.d/apache2 restart
  15. Go to https://yourserver.com/admin , create a user, and enjoy !

Here are some screenshots of the admin and web client:

ifolder-admin1

ifolder-admin2

ifolder-admin3

ifolder-web-client

The windows client

You can the install client to start creating ifolders of your own. You can download it on the official iFolder page. Once installed, the configuration steps are quite straight forward. Here are some screenshots:

ifolder-client1

ifolder-client2

ifolder-client3

From my initial use, everything is running sweet. One minor thing though: if you configure admin to not transfer big files (say more than 2 Gibis), the ifolder windows client will not stop from complaining that a policy prevents him from upload files. Also, it would be sweet if some folder could be easily removed from the sync process. However, this is still miles away from other setups. Everything works as it should. Plus, the web access is really a bonus.

The Ubuntu client

Thanks to the awesome work of Marcelo Boveto Shima, there is a ppa for installing ifolder client on Ubuntu. I tested it, and if there were some problems with the first version, I managed to get the latest one to work with my setup. Yeah ! Some screenshots:

iFolder Ubuntu client

So now, you can have a all in one sync solution that works… This rocks !

Update : I’ve had problem with running it in Ubuntu 9.10. On some computers, it works, but you have most problably to do this (thanks to MikeS):
In /usr/bin/ifolder,  change cd /usr to cd /usr/bin

Update : If you want it to work on your Ubuntu with an ecrypted folder. Short fix : run it from a non-encrypted folder. Long fix:


sudo mkdir /tmpsimias
sudo chown user1:user1 /tmpsimias
ln -s /tmpsimias ~/.local/share/simias

Run ifolder for the first time and exit.

rm ~/.local/share/simias
mv /tmpsimias ~/.local/share/simias

IFolder is happy after that. But you will also need to patch simias.

--- simias-1.8.4.0.trunk.7360/src/core/Simias.Web/SharedCollection.cs.ori 2010-07-06 12:10:06.000000000 +0200
+++ simias-1.8.4.0.trunk.7360/src/core/Simias.Web/SharedCollection.cs 2010-07-06 12:11:54.000000000 +0200
@@ -1106,7 +1106,7 @@
while(mntLine != null)
{
// verify it's a device on this box
- if(mntLine.StartsWith("/dev") && (mntLine.IndexOf("iso9660") == -1))
+ if((mntLine.StartsWith("/dev") || mntLine.StartsWith("/home")) && (mntLine.IndexOf("iso9660") == -1))
{
Stat stat;
string[] entries;

This patch will allow you to select an encrypted home folder for sync.

151 comments

  1. Hello all
    I installed ifolder server successfully, but when logging into the system, the following error message:

    Error: NullReferenceException

    Server Version: 1.8.5.0
    HostName: ifolders
    MachineName: ifolders
    OS Version: Unix 2.6.34.10
    CLR Version: 2.0.50727.1433

    Exception detail:

    Exception type: NullReferenceException

    System.NullReferenceException-Object reference not set to an instance of an object

    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReceiveResponse (System.Net.WebResponse response, System.Web.Services.Protocols.SoapClientMessage message, System.Web.Services.Protocols.SoapExtension[] extensions) [0x00000] in :0
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String method_name, System.Object[] parameters) [0x00000] in :0
    at iFolderAdmin.GetiFolder (System.String ifolderID) [0x00000] in :0
    at (wrapper remoting-invoke-with-check) iFolderAdmin:GetiFolder (string)
    at Novell.iFolderWeb.Admin.iFolders.CreateiFolderList () [0x00000] in :0
    at Novell.iFolderWeb.Admin.iFolders.GetiFolders () [0x00000] in :0
    at Novell.iFolderWeb.Admin.iFolders.Page_PreRender (System.Object sender, System.EventArgs e) [0x00000] in :0
    at System.Web.UI.Control.OnPreRender (System.EventArgs e) [0x00000] in :0
    at System.Web.UI.Control.PreRenderRecursiveInternal () [0x00000] in :0
    at System.Web.UI.Page.ProcessLoadComplete () [0x00000] in :0
    at System.Web.UI.Page.InternalProcessRequest () [0x00000] in :0
    at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in :0

    How to fix the error? Help me please!

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Vous pouvez utiliser ces balises et attributs HTML : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).