Monday, January 18, 2010

Folder sharing woes, and ultimate success!

Have you ever had a computer problem you've grappled with for days, experienced frustration and despair, and finally found an answer so simple it left you asking "Was that all there was to it?"
Well here is such a tale.
First some history. Sharing a folder between computers is supposed to be easy in Ubuntu, according to the Ubuntu documentation. At the time I tried it (probably around 8.04) there were two options for sharing folders with a right-click- Samba and NFS. Neither worked for me with the simple right-click option alone.
I had some success following this YouTube guide to Samba, which allows file sharing between Windows and Linux computers- and also between Linux computers. (The guide is for Ubuntu 6.10, but still seems relevant to current versions.) Accessing shared folders over the network was problematic, but using the IP address of the computer worked pretty well.
(The NFS option does not appear when attempting to share folders in Ubuntu 9.10 -Which makes me think it never worked as a right-click option without further configuration. It's interesting to note that the Samba guide considers Samba unnecessary for sharing folders between two Linux computers.)
After replacing an Ubuntu installation with Debian on my old computer recently, I tried to access the shared folder on my newer computer again- without any success. I looked at a lot of guides to Samba on the internet, and a lot of forum pages describing similar problems. This is where the frustration and despair mentioned above came in. (If I could have understood the guides and forum pages I looked at, I'm sure I'd be qualified as a network administrator.)
Eventually I found a partial answer. I'd been experimenting with a firewall (GUFW) and it had been blocking Samba. Removing the firewall (I'm behind a hardware firewall anyway) got me back to the previous situation- I could access the shared folder, but only by using the IP address of the computer, not the computer name. In frustration I uninstalled Samba and decided to have a go at using NFS- since it is recommended for sharing between two Linux computers.
I found a guide that seemed reasonably simple to follow, and had a go. Result? Failure. More frustration! But then I tried something mentioned in one of the comments. Suddenly it worked! I could see shared folders instantly and access files in a flash!
This was indeed the "Was that all there was to it?" I alluded to previously.
The thing that worked for me was to tell my computer the IP address of the computer I wanted to connect to. Which makes me think that my router is not good at matching a computer name to an IP address over the network. Which in turn makes me think that the reason I could get Samba to work (very well) may have been the same problem with one computer obtaining the IP address of the other.
I'm tempted to go back and try the right-click, 'Share this folder' option in Ubuntu again and see if it works now, but for the moment I'm going to post the guide to installing NFS folder sharing, in the hope that somebody might find it useful.

No comments:

Post a Comment