Can I use fstab to mount HTTP shares?

6,263

Solution 1

http: is usually used for WebDAV shares, so:

  • If you use Ubuntu, you'll probably have GNOME or KDE. Both accept URLs like dav://host/path in their file managers.

    (GNOME also lets you gvfs-mount dav://address from terminal.)

  • If you want to skip the GVFS and Kio layers, you will want davfs.

    (cifs, which you are trying to use, is purely for the Windows file sharing protocol.)

Solution 2

Probably not. fstab isn't magic, it's just a list of file systems that your computer will try to mount at start time (and other times, but start time is usually where it's read). The file is read, and then various mount utilities are used, depending on the file system type. And CIFS as a protocol isn't remotely close to the http protocol. It's like you're writing 'plug the Nintendo 64 cartridge into the XBox360' and assuming it will just work. You need something that actually speaks http in this instance.

Do you really need file system over http, or do you want to just read/write files on a webserver that you control? If it's the latter, you need to figure out how those files are served on a fileserver (cifs, nfs) and configure that.

Do you really want to serve over http? It wasn't designed (though can be forced into it) as a file system protocol. Look into WebDav, and there are some (http://savannah.nongnu.org/projects/davfs2) true drivers for webdav.

Solution 3

That is not a HTTP share in Windows, either. It's a CIFS share.

Instead just use

 //1.2.3.4/sharename /mnt/sharename cifs username=myusername,password=mypassword 0 0
Share:
6,263

Related videos on Youtube

David Fox
Author by

David Fox

Updated on September 17, 2022

Comments

  • David Fox
    David Fox over 1 year

    I typically mount the "drive" in question in Windows with an http://1.2.3.4/sharename address. In Linux (Ubuntu 10.04), I tried adding the following entry to /etc/fstab to no avail:

    http://1.2.3.4/sharename /mnt/sharename cifs username=myusername,password=mypassword 0 0
    

    When I mount /mnt/sharename, I see this error:

    mount, wrong fs type, bad option, bad superblock on http://1.2.3.4/sharename
    

    How can I mount this path in Ubuntu 10.04?

  • David Fox
    David Fox over 13 years
    It just times out. Does the username need a domain or anything?
  • David Fox
    David Fox over 13 years
    I don't have specific access to the box hosting the mapped drives currently in use by my Windows users. So, it's not a "do you need" or "do you want" question, it's a "have this, how do I make it work" :)
  • user1686
    user1686 over 13 years
    CIFS is not served over HTTP.