CrushMFT Documentation

Custom VFS#

Two different things go by this name: a storage type that a developer writes, and a location that a user adds to their own account.

A storage type of your own#

The types of the VFS cover the usual systems. For anything else, such as records of a database shown as files, or an in-house archive, a Java developer can write a client class. An item whose address starts with custom. and the name of the class uses it:

custom.com.example.storage.ArchiveClient://archive.example.com/
Rule
Where the class is on the server's class path, or in a jar named after the class in plugins/lib/ of the server's folder
How it is made with three values: the address, a text for log lines, and the list the log lines go to
What it must do the same things the built-in types do: log in, list, read, write, delete, rename, make a folder
What is refused class names of the server itself and of Java (com.crushftp., crushftp., java., javax., sun. and the like)

The class runs inside the server with all its rights. Treat it like the server's own code: review it, and keep plugins/lib/ writable only for administrators.

A location a user adds themselves#

An administrator can allow a user to connect storage of their own: the user gives an address and a login, and it shows up as a folder in their account. This is for people who work with many outside systems and should not have to ask each time.

It is an Enterprise feature, and it works for users of the User Manager, not for users that a plugin signs in.

Allowing it#

The user needs the value user_defined_vfs, with these parts:

Part What it is When empty
name the name of the folder User Custom VFS
privs its permissions, such as (view)(read)(write) (view)(read)
host_filter a pattern the host name must fit, such as *.partner.example.com any host
ip_restrictions addresses that are allowed or refused no restriction

Note

The User Manager of version 27 has no card for this value yet, and the web interface has no window in which a user types the address. The server side is there: the value is set in the user's stored settings, and the address is saved with the server's command for it.

What the server allows#

The address is the user's own text, so the server is strict with it:

  • Only addresses of the types FTP, FTPS, FTPES, SFTP, HTTP, HTTPS, WebDAV and WebDAVS: a user cannot point at the server's own disk or at cloud storage.
  • No address inside private networks: loopback, link-local and private ranges are refused ("Only remote locations allowed"), so that a user cannot reach machines behind the firewall through the server.
  • The host must fit host_filter and ip_restrictions.
  • No connection profile can be named in it, and no connection options can be hidden in it: the item is stored as the bare address.

Which one do you need?#

You want Use
a system CrushMFT has no type for a storage class of your own
users to bring their own SFTP or FTP account a location the user adds
users to reach a system with their own login to it an ordinary item with {username} and {password} in the address: see The VFS editor