| Crates.io | remotefs-fuse-cli |
| lib.rs | remotefs-fuse-cli |
| version | 0.1.0 |
| created_at | 2024-12-26 15:17:49.585038+00 |
| updated_at | 2024-12-26 15:17:49.585038+00 |
| description | A FUSE Driver for remote-fs |
| homepage | |
| repository | https://github.com/remotefs-rs/remotefs-rs-fuse |
| max_upload_size | |
| id | 1495698 |
| size | 115,504 |
~ A FUSE Driver for remotefs-rs ~
Developed by @veeso
Current version: 0.1.0
First of all you need to add remotefs-fuse to your project dependencies:
remotefs-fuse = "^0.1.0"
these features are supported:
no-log: disable logging. By default, this library will log via the log crate.use remotefs_fuse::Mount;
let options = vec![
#[cfg(unix)]
remotefs_fuse::MountOption::AllowRoot,
#[cfg(unix)]
remotefs_fuse::MountOption::RW,
#[cfg(unix)]
remotefs_fuse::MountOption::Exec,
#[cfg(unix)]
remotefs_fuse::MountOption::Sync,
#[cfg(unix)]
remotefs_fuse::MountOption::FSName(volume),
];
let remote = MyRemoteFsImpl::new();
let mount_path = std::path::PathBuf::from("/mnt/remote");
let mut mount = Mount::mount(remote, &mount_path, &options).expect("Failed to mount");
let mut umount = mount.unmounter();
// setup signal handler
ctrlc::set_handler(move || {
umount.unmount().expect("Failed to unmount");
})?;
mount.run().expect("Failed to run filesystem event loop");
Linux: you need to have fuse3 installed on your system.
Of course, you also need to have the FUSE kernel module installed.
To build remotefs-fuse on Linux, you need to have the libfuse3 development package installed.
In Ubuntu, you can install it with:
sudo apt-get install fuse3 libfuse3-dev
In CentOS, you can install it with:
sudo yum install fuse-devel
macOS: you need to have the macfuse service installed on your system.
You can install it with:
brew install macfuse
Windows: you need to have the dokany service installed on your system.
You can install it from https://github.com/dokan-dev/dokany?tab=readme-ov-file#installation
remotefs-fuse comes with a CLI tool remotefs-fuse-cli to mount remote file systems with FUSE or Dokany.
cargo install remotefs-fuse-cli
remotefs-fuse-cli can be built with the features below; each feature enables a different file transfer protocol
aws-s3ftpkubesmb: requires libsmbclient on MacOS and GNU/Linux systemsssh (enables both sftp and scp); requires libssh2 on MacOS and GNU/Linux systemswebdavAll the features are enabled by default; so if you want to build it with only certain features, pass the --no-default-features option.
remotefs-fuse-cli -o opt1 -o opt2=abc --to /mnt/to --volume <volume-name> <aws-s3|ftp|kube|smb|scp|sftp|webdav> [protocol-options...]
On Windows the mountpoint can be specified simply using the drive letter --to M will mount the FS to M:\
where protocol options are
--bucket <name>--region <region> (optional)--endpoint <endpoint_url> (optional)--profile <profile_name> (optional)--access-key <access_key> (optional)--security-token <security_access_token> (optional)--new-path-style use new path style--hostname <host>--port <port> (default 21)--username <username> (default: anonymous)--password <password> (optional)--secure specify it if you want to use FTPS--active specify it if you want to use ACTIVE mode--namespace <namespace> (default: default)--cluster-url <url>--address <address>--port <port> (default: 139; Linux/Mac only)--share <share_name>--username <username> (optional)--password <password> (optional)--workgroup <workgroup> (optional; Linux/Mac only)--hostname <hostname>--port <port> (default 22)--username <username>--password <password>--url <url>--username <username>--password <password>Other options are:
--uid <uid>: specify the UID to overwrite when mounting the remote fs. See UID and GID override.--gid <gid>: specify the GID to overwrite when mounting the remote fs. See UID and GID override.--default-mode <mode>: set the default file mode to use when the remote fs doesn't support it.Mount options can be viewed in the docs at https://docs.rs/remotefs-fuse/latest/remotefs-fuse/enum.MountOption.html.
❗ This doesn't apply to Windows.
The possibility to override UID and GID is used because sometimes this scenario can happen:
100010021000 can't operate to files owned by 1002But of course this doesn't make sense: I signed in with user who owns those files, so I should be able to operate on them.
That's why I've added Uid and Gid into the MountOption variant.
Setting the Uid option to 1002 you'll be able to operate on the File system as it should.
Please consider this is an early-stage project and I haven't heavily tested it, in particular the Windows version.
I suggest you to first test it on test filesystems to see whether the library behaves correctly with your system.
View remotefs-fuse`s changelog HERE
remotefs-fuse is licensed under the MIT license.
You can read the entire license HERE