[TxMt] Remote filesystems (was: Remote projects)

Gerd Knops gerti at bitart.com
Fri Sep 23 20:11:03 UTC 2005

Hi all!

[For the impatient reader: Just some food for thought, no solution  

The discussion about remote projects made me think that ideally  
Virtual File Systems (VFS) really do not belong into the editor,  
rather they should be part of the OS. An example is the OS X webdavfs  
[1], which allows to mount webdav servers with the Finder, or the  
(poorly working and read only) ftp file system [2]. Something like  
that for SFTP would be the ultimate solution.

Under linux there is an interesting project called Fuse [3], which  
basically hooks a generic driver into the kernels VFS and  
communicates with user-space file system 'modules' (the OS X webdavfs  
works somewhat similar). Someone else recently wrote a driver for  
FreeBSD [4] that allows to use the Fuse file system modules.

The problem is that the OS X VFS implementation seems to be rather  
under-documented and auite the moving target [5]. It changed a lot  
for Tiger. It has developed independent from  FreeBSD, so porting the  
FreeBSD Fuse driver is not at all trivial (lack of documentation  
again not helping).

I briefly entertained a bridge that would make a remote sftp server  
appear like a webdav server, allowing it to be mounted locally using  
the webdavfs and without extra software on the server. While this is  
relatively easy to do (at least compared to the alternatives), it has  
one major back-draw: DAV [6] (complex [dare I say convoluted] as it  
seems) does not support the notion of file permissions. And the  
thought of making all files pushed to the server executable (or not  
executable) is not very appealing.

The ftpfs [2] on OS X uses yet another approach: It presents itself  
to the OS as an NFS server, and translates NFS to FTP. This may seem  
like a convoluted approach (and it is), but has the advantage that it  
can be completely implemented in user space, and the NFS protocol  
encapsulates it from changes in the kernels VFS implementation. So  
one could write a bridge/gateway program that serves NFS and  
translates it to SFTP. Or (though I have not had a look at  
feasibility) it might even be possible to make this Fuse compatible,  
giving easy access to many of the file system modules available for  
Fuse ([7], or makings of a RailsFS [8]). Sometimes I wish I wouldn't  
have to work for food...


[1] man mount_webdav
[2] man mount_ftp
[3] http://fuse.sourceforge.net/
[4] http://wikitest.freebsd.org/moin.cgi/FuseFilesystem
[5] http://developer.apple.com/qa/qa2001/qa1242.html
[6] http://www.webdav.org/
[7] http://fuse.sourceforge.net/filesystems.html
[8] http://redhanded.hobix.com/inspect/ 

More information about the textmate mailing list