Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a machine on which I wish to mount multiple remote servers to access them all centrally. For remote Linux based systems I am using SSHFS which works fine. But for Windows systems, or systems without SSH, they all have some form of HTTP server installed sharing the files (so they all have directory browsing enabled).

Can I mount a HTTP server as a local file system like SSHFS, so I can have all these remote servers mounted locally and presented in a uniform manner?

share|improve this question
1  
Someone out there might have written a tool to simulate this but I doubt it. The way that HTTP servers typically present the information is not very conducive to it. –  goldilocks Mar 11 '13 at 14:54
    
As above. Also the HTTP browsing is just that - it browses and reads, doesn't support uploading. I would look at either sharing the folder(s) to mount either via SMB/CIFS or FTP. Alternatively look at WebDAV and I'm sure you can find a IIS implementation. –  Dave C Mar 11 '13 at 15:15
2  
@goldilocks someone out there made it a standard well over 10 years ago. –  jordanm Mar 11 '13 at 15:21
    
Live and learn. :) –  goldilocks Mar 11 '13 at 15:28
1  
@DaveC Well typically directory browsing doesn't support uploading, however I failed to mention that I wanted read only access. Although HTTP it's self does support uploading with the PUT method. –  jwbensley Mar 11 '13 at 20:07

2 Answers 2

You can do this using WebDAV. This is an HTTP extension that is supported by most web servers, including IIS and Apache. WebDAV can be mounted in linux via the davfs2 FUSE module.

share|improve this answer
1  
davfs2... or fusedav or avfs or gvfs (Gnome/Nautilus) at least. –  Stéphane Chazelas Mar 11 '13 at 20:11

The problem with plain HTTP is that its just for retrieving content. There's no concept of folder or file list.

Some web servers let you browse directory structures by generating nice HTML pages with links to files for directories. And at least things like lftp are able to parse some of the common formats those indexes are generated as and give you the impression that it is a file transfer protocol, but it's not really, and I don't know of any fuse file systems that can parse indexes the way lftp does.

DAV is an extension that just does that and is already covered by jordanm's answer.

But note that if you don't need to list directories, avfs at least can let you access web pages over the filesystem.

$ mkdir AVFS
$ avfsd AVFS
$ grep -w Reputation 'AVFS/#http:unix.stackexchange.com|users|12583|javano'
 <span class="count">731</span> Reputation

Now also note that you can install sshd (via cygwin) or a FTP or Apache with DAV on a Windows machine as well, so you should be able to do the same things as you do on Unix machines.

share|improve this answer
    
wouldn't the path portion of an HTTP URL be considered as corresponding to a directory structure under the root? also, many web servers offer a file listing if you request a URL ending with a directory, not a file. and then both of these two concepts could be translated into this model of mounting an HTTP server as a file system. now, as far as posting changes to such a mount, I am not sure about that but perhaps some web servers could be configured to do it much like FTP –  amphibient Mar 11 '13 at 21:37
    
@amphibient, yes, what you call a file listing is what I call a generated HTML page with links to file. It still needs to be parsed and there's no standard on the format of those pages. On Apache alone there are several modules generating those indexes which can be tuned in many different ways. So there's no foolproof solution. As I said see lftp that tries to parse many of those listing pages. –  Stéphane Chazelas Mar 11 '13 at 21:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.