fuseftp 0.1.0

Mount FTP servers as local filesystems
Documentation

fuseftp

A Rust library for mounting FTP servers as FUSE filesystems.

Usage

use fuseftp::{ServerConfig, FtpFilesystem};
use fuser::{MountOption, Session};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = ServerConfig {
        host: "ftp.example.com".into(),
        ..Default::default()
    };

    let fs = FtpFilesystem::connect(&config)?;
    let options = [MountOption::RW];
    let mut session = Session::new(fs, "/mnt/ftp", &options)?;
    session.run()?;
    Ok(())
}

The Session::run() call blocks until the filesystem is unmounted.

Features

Feature Default Description
tls Yes Enables TLS support via suppaftp's native-tls feature.
clap No Enables clap derives for config types (used by fuseftp-cli).

Default (with TLS)

[dependencies]
fuseftp = "0.1"

Without TLS

[dependencies]
fuseftp = { version = "0.1", default-features = false }

Limitations

  • File Permissions: Changing file permissions requires support for SITE CHMOD. This command is available on most Unix-based servers but not on Windows-based servers, where permissions must be managed through the operating system directly.

  • Symbolic Links: Creating symbolic links requires support for SITE SYMLINK, which is non-standard and only available on some servers. Additionally, paths containing spaces are not supported because the FTP protocol has no standard quoting mechanism for SITE command arguments.

  • Hard Links: Hard links are not supported by the FTP protocol.

Related Crates

License

MIT or Apache-2.0