Mount FTP via curlftpfs

  • Hi Guys,


    Any idea how I can manually add a mounting point for a remote FTP using curlftpfs ?


    I'm planning to use a remote FTP for backup and I decided to use curlftpfs to mount it. I tested mounting it via the fstab but being a manual entry is not recognized by OMV.
    Since the remotemount plugin does not support curlftpfs at this moment I decided to try to add the new entry manually in the config.xml
    I think because the fuse type is not supported I end up with errors like
    Could not fetch a matching mount point from the provided fsname
    or
    Couldn't extract an UUID from the provided path
    which seem to come from the mergefs implementation (mergerfs.inc)
    I tried all the combinations with no luck.
    The intended line in fstab is


    curlftpfs#ftp.server.com/folder /mnt/ftp fuse rw,relatime,user_id=0,group_id=0,allow_other 0 0




    Bellow are some of my variations of the config.xml entry)

  • You don't need to make an entry in config.xml to add a line to fstab. Just add it to fstab yourself outside of the [openmediavault] section.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Yes, kind of, my ISP provides also a storage service and also has the option of connecting via FTP and FTPS.


    Not sure how a VPN will change the way I connect to it.


    Set aside the security concerns, I was hoping to some pointers if this is even possible, I'm quite stubborn and spend a few hours on this, usually I don't know when to quit.

  • This thread is still high ranking for the search of curlftpfs & openmediavault. I found a (quirky) solution to the problem and I thought it'd be good to share it.


    To get OMV to creating a working entry in fstab I made use of the remotemount-plugin and omv-salt. Like crisp2u posted in their opening post, we want a line like:

    curlftpfs#ftp://server.local/share/     /srv/$ftpshareUUID     fuse     _netdev,(rw/ro),uid=$ID,allow_other,ssl,no_verify_hostname,no_verify_peer,user=/root/.ftpshare_credentials     0   0


    Never should the credentials for the ftp-share be put directly into the options! Better: a file only accessable by root:

    Code: /root/.ftpshare_credentials
    username:password


    HowTo: Get omv-salt deploy run fstab to create the entry.

    1. Modify 4 files of the remotemount-plugin to make it accept fuse


    Code: /usr/share/openmediavault/datamodels/rpc.remotemount.json
    [...]
    "mounttype": {
                    "type": "string",
                    "enum": ["cifs","ftpfs","nfs","fuse.glusterfs","9p","davfs","fuse"],
                    "required": true
                },
    [...]


    Code: datamodels/conf.service.remotemount.json + datamodels/conf.service.remotemount.mount.json
    [...]
    "mounttype": {
                "description": "The type of remote mount",
                "type": "string",
                "enum": ["cifs","nfs","davfs"]
            },
    [...]


    2. Edit the OMV config file

    Now, omv-salt deploy run fstab will do its job and add the share to omv's database. After a monit restart omv-engined it should appear in the web interface in "File Systems" and "Remote Mount".


    From this point on, I could leave the shell. Creation of "Shared Folders" for the ftpshare was possible within the omv web interface.


    The solution is anything but perfect. The changes to remotemount's files need to be merged everytime the plugin gets updated and the solution might stop working at all if incompatible changes are made to OMV's core components.

    For my no_internet_pure_local-NAS this is easily managed, as it cannot update itself. For others this might be a no-no.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!