Mounting Remote Filesystems in OSX

       

Most of my work for Automattic is done on a remote sandbox machine, somewhere in Texas. I’ll often jump in and make smaller edits over SSH via vi, but when I’m doing something bigger I much prefer to work locally, using TextMate (I’m on a Mac, obviously). To do that, I need to be able to access files as if they were local, which means either duplicating them to my machine (lame, annoying) or mounting them directly.

I’ve been doing that via one of the following options, and I’m wondering if anyone out there has a better solution.

I’ve tried both for a while now. They both work. Except for when they don’t. Here’s what I’d found:

  • Transmit seems more responsive, when it’s working
  • Macfusion often crashes Finder the first time I access a newly connected filesystem (and is then reasonably stable)
  • Transmit much more randomly just stops working and gives no indication, I just can’t browse any more and have to disconnect/reconnect
  • Macfusion allows you to easily customize a neat icon for each filesystem
  • Transmit seems to have more aggressive caching (or a longer TTL on it) of filesystem details (part of what makes it feel more responsive)

So, have you used one of the following methods? Is there a configuration option I’m missing? How do you go about solving this problem?

UPDATE: I should have mentioned that I need to be able to do this over the open internet (securely), where I’m not connected directly to the same network as the server.

  1. Ryan Markel said:

    I've had ExpanDrive recommended to me but I have not yet tried it myself.

    I currently use a combination of Transmit over SFTP and right-clicking on files to use the Edit with TextMate command. I should probably try something else myself at some point. 🙂

    • Daniel Bachhuber said:

      In more seriousness, I use Cyberduck which allows me to open remote files in Sublime Text (and TextMate). When I edit and save the files, those changes are saved directly to the remote machine.

      My only complaint with this setup is that navigating the file structure, opening and saving files is slow. I've started looking for a better solution but haven't found it yet.

      • Mo Jangda said:

        I do the same with Transmit — it's a lot faster since it caches folder contents. But still not optimal.

      • יואב said:

        What Daniel said, but I'm using ForkLift which I find faster and better than Cyberduck.

        • Daniel Bachhuber said:

          @yoav Is it really worth switching from Cyberduck? I could be easily convinced….

          • יואב said:

            I switched because Cyberduck was hanging too often, and I was losing edits. Thorsten recommend ForkLift and I've been really happy with it ever since.

      • Ian said:

        I use Cyberduck with Textmate but after opening a file in Textmate I open in it terminal (shift-ctrl-o) and use <code>mate .</code> to create a project. It's a little janky because it doesn't close the unprojected file and you have to do that manually. And then you have to re-download/open that file again to convince Textmate that, no, really, you are serious about using that project, but once that's done it works great. I have this all in muscle memory so it's pretty fast for me to do.

  2. I've been using the built-in Coda stuff (which you can trick to work with SSH keys instead of passwords) and it's been completely transparent to me — you can even drag stuff to the left panel to upload so I don't have to fire up a FTP program, having a terminal right there is handy, and I do all my SVN stuff directly from the sandbox, as God and Barry intended.

    • Beau Lebens said:

      Interesting — from my understanding Code embeds the Transmit engine (both made by Panic), but I guess they either improved stability, or just gave it more robust error handling or something. You're not the first person who's told me that Coda has great remote filesystem handling.

    • Brian Paul said:

      You can get here without Coda. Shared keys and port forwarding can be completely seamless. You can even create a simple script to connect and alias it for the CLI. There are also some apps in the app store for handling Tunnels (SSH Tunnlr, SSH Tunnel Manager) but I haven't had as much luck getting them to JFW as I have with the traditional methods.

      For the record, I have the same problems with Transmit as Beau does.

    • Mo Jangda said:

      This inspired me to set up Remote Folders in Komodo. Navigating around is a bit of a pain (Komodo Edit doesn't have the "Go to File" feature :(), but seems to work well.

        • Mo Jangda said:

          SCP. I learned that "Go to File" does exist in Komodo Edit but doesn't work with Remote Folders. It does work if I mount my sandbox using Transmit, which makes navigating around super speedy. It just has problems if you lose your network connection.

    • Andy P said:

      Coda has excellent remote file editing, it’s what I use, but it’s just not a great editor compared to Textmate or Sublime. I’d love a solution that would allow me to ditch it.

    • Matt Thomas said:

      This is exactly how I work. Coda's SFTP for file uploads, Coda's text editor for writing code, and Coda's terminal for everything SVN.

    • evansolomon said:

      One more vote for Coda here. I wish navigating the remote files was faster. I've tried a couple Coda plugins for keyboard based navigation on remote files, but none have been great. Other than that, I'm a very happy Coda user.

  3. Danilo said:

    I've a local copy of the projects i'm working on, and I use FileZilla to keep them synched with the remote machine (sftp + synched browsing).

    • Beau Lebens said:

      I don't trust myself enough to remember to click anything to specifically keep things in sync 🙂 Does FileZilla do some sort of auto-sync? Or does it rely on you clicking something to tell it to sync local/remote?

      • Danilo said:

        Unfortunately don't think there is an auto-sync feature, but you can enable the "directory comparison" option, that at least, shows you which file was changed (locally or remote).

  4. Jorge Bernal said:

    I've tried Macfusion and Expandrive and they're both equally nice in general, but fail at performance, specially when throwing Textmate into the mix (which re-reads the folder on every focus)
    Cyberduck is cool for doing a quick edit on a file.
    The best thing I've tried yet is Coda. It's not my favorite editor by far, but it does the ssh part very decently.

      • Jorge Bernal said:

        Yep, but then you do svn up, forget to force the project reload, and you're in a bit of a mess 🙂

  5. Lance said:

    This seems like the new holy grail—I'm also searching for a good solution. Coda is mostly there but lacks the power and super user customization of TextMate or Sublime Text 2.

    I've been using Transmit + TextMate mosty, and generally edit one file at a time (double-click in Transmit, opens in TextMate). I've started using vim more, though, since it's faster for the remote editing.

    For a really complicated task, I often work locally and manage the files via SVN. Either commiting from local machine to the repo, or using Transmit to sync up, test on remote server, and then commit from remote server.

    Transmit 4 has the volume mounting feature built-in now, but it's way to laggy for me to use it (I have a pretty slow internet connection). One annoying thing I did solve was where the project would become unresponsive when switching back to TextMate from another app; the ReMate plugin helped with that: http://ciaranwal.sh/remate/.

    • Beau Lebens said:

      I played with ReMate for a while, but as Jorge says, you can easily get yourself in a mess with that if you don't have your wits about you (which I don't). I'm back to just having it refresh when I go back to the window — different solutions above make that take longer or shorter (e.g. Transmit-mounted disk appears to be faster than Macfusion/MacFUSE, file opened through Transmit directly is instant (local cached copy)).

  6. ForkLift 2 – The second coming of file management « danielbachhuber

  7. Daryl Koopersmith said:

    It seems like everyone has dealt with this issue. I've gone through various builds of MacFUSE, ExpanDrive, and Transmit 4 (in that order). I find that Transmit's disk mounting is by far the most stable of the three.

    Most builds of MacFUSE seem to have Lion compatibility/stability issues, and ExpanDrive doesn't play nicely when sleeping/waking your computer or when switching/dropping an internet connection.

    When mounting a drive via Transmit, I usually have an ssh session open alongside a terminal window to navigate the mounted drive. I'll then strategically create TextMate projects (to prevent the slowness). I love me some TextMate, so Lance's recommendation of ReMate (http://ciaranwal.sh/remate/) is a must.

    If you find the holy grail, I'll be the first in line.

    • said:

      I've had troubles with MacFUSE since Lion, but then discovered it has been abandoned. However, I've found OSXFUSE (which is completely compatible with MacFusion) which has yet to misbehave.

      • Daryl Koopersmith said:

        I've tried OSXFUSE and the other forks designed to work with Lion… it was difficult to get them to work, and nothing I found was very stable through sleep and network changes. It made me sad.

        • Beau Lebens said:

          I haven't found anything that's stable through network changes yet, other than opening a file via Transmit directly (because it caches the file locally, and will reconnect if you try to do something and it's not connected).

  8. bitpushr said:

    If you're working primarily with text files (as in, .txt or .rtf or .csv or…) then I would use a combination of VPN + NFS (assuming the files ultimately live on a Linux or Mac server.) If you're working primarily with files that require extended attributes (some Microsoft formats, other "full" document formats etc.) then you're going to prefer something that's aware of the way Apple handles those attributes. That's probably going to look like a VPN client + AFP.

  9. John said:

    I use a simple plugin with Sublime Text and edit locally. Whenever a change is made to a local file, it SCPs it to the remote server.

    SVN is on both sides so I can update things if they get out of sync. It works well enough that I've been using it full time for the past few months, it's a lot faster than MacFUSE/ExpanDrive, and I get to use tools on local files.

  10. egille said:

    I like John's solution, both the plugin for Sublime Text and SVN. The only thing that never fails on me is vim over ssh (+screen).

    I've tried everything, ExpanDrive, Transmit, CyberDuck, SFTP in BBEdit, MacFuse… they do a decent job, as long as there isn't too much netlag. Browsing files is what kills everything for me, specially with folders with large number of items in them.

    Another thing that contributes to how much this sucks is the fact that I use ADSL, and the upload speed stinks, when things take longer than expected – weird things start to happen. I've spent too much time staring at the dreadful spinning beachball, or watching editors die on me.

    This works:
    Edit locally, sync with server via scp/svn.
    Edit remotely using $EDITOR over ssh.

  11. sam parsons said:

    I've tried Transmit 4's mount as a volume and MacFuse and have found them to be buggy. A lot of the time I use Transmit hooked up to vim (MacVim) to edit live on the server. Each new file opened in Transmit opens a new tab in MacVim. Saving the file causes Transmit to scp the changes back to the server. I'm not clear as to what CyberDuck offers in this regard that Transmit does not — I've used CyberDuck and it doesn't seem any better at that process. As others have pointed out, since I like vim, I probably should just do vim + ssh and have no lag, but the graphical file structure is helpful.

    For times when it makes sense to do the work locally, I typically use git to record the changes and push them up to the main server. I much prefer this workflow for long coding sessions.

    Also, as a side note, if you're stuck having to FTP files to a server because for some reason they don't have SFTP (as was the case in a recent project), you should check out lftp. With a little time you can develop a script to mirror everything from your local copy to the server (or vice versa) allowing something similar to the git pushing / pulling.

  12. eggfriedrice said:

    Hey

    I've done similar on both Mac and Linux and it's always a bit of a pain. I've used Cyberduck (ok but a little buggy) and Macfusion (ok but not very tolerant of crappy connections). Now I'm mostly switched to Linux I use sshfs (as used in Macfusion) but generally prefer Viming over SSH…

    Another option to investigate might be Webdrive for Mac: http://www.webdrive.com/products/webdrive/mac/ind

    I've used (and I've set up for some of my clients) Webdrive for Windows to mount a remote SFTP filesystem as a Windows drive letter. It works really well but it's not the cheapest solution ($70 for Windows, $35 for Mac by the look of it). There's a trial version though so you can see if it'll work better than a free solution for you.

  13. read this said:

    Well I didn't know I had MacFuse, but my system preferences say's I do. It seems to be part of my Tuxera NTFS, which I must say is a brilliant program for supporting read and write on NTFS drives. The only reason I wanted an NTFS partition is so I could have it as my file drive, and act as an easy intermediate between Mac OSX and Windows bootcamp, and it's pretty stable. Yes I know Windows OS pales in comparison to Mac OSx, I mean for peat sake I can have 16 desktops, switch between them easily, fast, and see all my programs at once with a flick of a trackpad, what does Windows have, bloody tiles (for Windows 8). But still Windows does have it's use for games, so this is why I like an NTFS partition. Anyway sorry for going a bit off topic.

Comments are closed.