Once in a while, I need to share files with other computers in the network. But I don’t do it every day, so I am reluctant to setup a 1)Web server, 2) Samba server, 3) NFS server. Most of the time, accessing a windows share in a Windows computer fails – I can meddle with the Samba/Firewall setup and troubleshoot, but it usually ends up in vain. Further, you need to be root to add folders as Samba shares. I usually do scp over the other GNU/Linux machines, or give the other Non-GNU/Linux guy a copy of pscp and ask him to do an scp.
Well, what about a naive user, who just wants to share his files to his buddy sitting next to him? There are not too many easy tools I knew of, so I decided to weigh my options. And I found these candidates:
1. Giver – a very intuitive, and easy file sharing tool. You can simply share the files with computers that have giver installed. See it in action here. The cons:
- Dependency on Mono. I always purge Mono out of my installation.
- Client side needs to install Giver.
2. iFolder. Again, Mono, and client-server.
3. Dropbox. Feature rich. Cons:
- Need to have dropbox account, need internet connection.
- Client side also needs to install it.
4. Meiga. Lightweight, easy to use content server for desktop. It uses a lightweight web server protocol with libsoup. As and when required, just fire it up, and add the folders you want to share. The best thing – no need to install anything on the client side – the shared files can be accessed using a web browser.
So I decided to try it out on Fedora 11. Unfortunately, the developer provided only .deb files for Debian/Ubuntu, and there was no source tar ball. But there was a git repository, which I cloned, and created source tar ball out of it. Meddled with it to figure out the correct way to build and to find the precise build requirements. Build is based on autotools, and intltool. Then created a SPEC file and built the RPM.
While testing, I found out that Meiga couldn’t find any internal IP address. Investigated a bit, but strace, dbus-monitor etc didn’t help much. Then I contacted Enrique, the upstream developer and over the past week, we brainstormed together. Meiga gets the internal IP from a utility shell script – “/usr/bin/fwlocalip“, which internally uses the “/sbin/ip” and a little sed and grep to chop it. The problem with Fedora was that “ip” is in “/sbin” instead of “/bin” as in Ubuntu, and the PATH setting was not correct. So now the script is fixed to have better PATH environment variable setting, and Meiga works like a charm. Meanwhile, I requested Enrique to produce source tar ball also, and he kindly did so.
Just fire up Meiga as a normal user, add the folders you want to share, and give the link “http://<your_ip_address>:8001/<Share>/” to your friend and tell him to access using a web browser. That’s it – oh, make sure your firewall allows incoming connection to port 8001:
iptables -A INPUT -p tcp --dport 8001 -j ACCEPT
Now I’ve filed a review request in the RedHat bugzilla to include Meiga. Hopefully someone will review it and I’ll fix any issues present, and I look forward to get Meiga into Fedora packages. Meanwhile, you can find the RPMs here.