Ubuntu Network Drive

If you’re anything like me you work in an office with a co-worker or two (or 50) and you have a generous handful of files you’re sharing between you. You’re probably also using dropbox shared folders and maxing them out. This week Tribeswell set out to fix this problem by creating an office server. After spending an afternoon googling one problem after another we decided to create this tutorial on the process:

Our Situation:

Our system has the following characteristics:

  • We all have Macs running Lion that we work from
  • We are using an old pc and Ubuntu
  • We want to simply have a network hard drive we can share and store files on

The Hardware

Everyone has that friend or family member with an old computer they are neglecting in the garage or attic. A quick visit and please&thankyou should get you started with all the hardware you need.

For our computer we decided the stocked 160gb hard drive wouldn’t be quite large enough, so we bought a 500gb and the necessary hookup components. After installing the new hard drive we were all set to get started on creating our office server.

The Operating System

Since we were starting from a fresh hard drive, and because all the noise we heard about Ubuntu as a server from the internet, we decided linux was our best option for the operating system.

Download Ubuntu Here

Installing Linux is pretty straight forward. The Ubuntu website has most of the answers you need to get things up and running. We installed off a cd since its somewhat difficult to set up a linux boot flash drive on Mac. Following the onscreen directions was all it really took to get things up and running

Linux is a little unique in that when people create tutorials for making things happen on the system, they almost always direct you to use the terminal. Since we were completely unfamiliar with the OS we had to figure out a few key things:

  • Use CTRL+ALT+T to open a new terminal window
  • You will often need to log in as the ‘root user’ to make system changes. Do this by typing in ‘sudo bash’ pressing enter, and then your user password when prompted. – This was the easiest method we found.
  • the ‘/etc/’ folder is located under the filesystem directory which can be found from the file finder, similar to Mac.
  • For folders and other items that require permissions to write, you may have to change your permission settings. This is pretty simple and is outlined Here. Basically press alt + F2 and type ‘gksudo nautilus’ – entering your password should change your permissions and allow you to edit any file you want.

The Software

Once Ubuntu was installed we were pretty much lost. Googling file sharing solutions led to a series of confusing tutorials ranging from creating a full web server to setting up a network drive using windows. However, after a lot of searching we found a few articles that turned out to be very helpful. The process is as follows:

  1. Install Netatalk: Since we all use Mac products, we needed a file sharing service that would work well with OS X. Turns out Apple uses its own File Transfer Protocol called AFP (Apple file protocol) and the software Netatalk helps Ubuntu to talk with Mac computers on your network.

    The Missing Readme has a pretty good explanation of how to set this up

    However, I do want to mention that since we were using the latest version of Ubuntu (11.10) and Netatalk (2.2) a few of the steps were unnecessary. For instance, the tutorial mentioned turning off settings that helped Netatalk work with older versions of Mac OS, this was unnecessary as they were already turned off for us. Additionally, we were cool with setting up the home folder as our default shared folder and creating files within it, so we didn’t need to add any other directories.

  2. Install Avahi: Netatalk helps your server intact with, and transfer files between computers on your system. To really add convenience and a Mac-like experience you should install Avahi to help the server imitate Apple’s Bonjour service. It basically tricks your Macs into thinking the Ubuntu server is just another Mac on your network. This really helps when you want to interact with the files on the server.
  3. Logging in and using the server: In order to log in and use the server, open up a finder window on a Mac device and find the server identified on the left hand panel. Click on it and then connect as – use the Linux username and password created on installation and things should be up and running. Sharing folders and files should be as easy as dragging and dropping.

Some Limitations

  • This system won’t really help you if you’re looking for a remotely accessible server.
  • Your transfer speed is pretty dependent on your network/router speed
  • It is pretty easy to save over someone else’s work, if two or more people are working on the same document

However, with that being said, we managed to take an out of date computer and create a network hard drive that will open a great deal of space on our local machines. It allows for fast and convenient sharing of files by everyone in the office, and it was next to free to get everything up and running. Hopefully, your project goes a little smoother with the tips and processes laid out above. Good Luck!