#networking #mount #fuse #dont #fs #tocco

app toccofs

FUSE-Based Network filesystem for Tocco

1 unstable release

new 0.0.1 Jan 9, 2025

#55 in #mount

Download history 86/week @ 2025-01-04

88 downloads per month

AGPL-3.0-or-later

74KB
2K SLoC

toccofs - FUSE-Based Network FS for Tocco DMS

Introduction

A network filesystem allowing to mount Tocco DMS locally via Tocco's REST API and accessing it via filesystem. It's implemented using FUSE (Filesystem in Userspace).

This is a personal project, this software is not provided by Tocco AG, although it interface with their software, Tocco. This is a fun project and is unlikely to be maintained long-term. More features may get added, or bugs fixed but don't count on it.

Prerequisites

  • An operating system with FUSE support (e.g. Linux or FreeBSD).
  • An API key. (You may not have permissions to create one.)

Quick Guide

toccofs mount --user-name <user_name> --api-key-file <path_to_key_file> <hostname> <mount_dir>

Example:

mkdir mnt  # empty folder
toccofs --user-name pgerber --api-key-file ~/tocco-api-key master.tocco.ch mnt/

Then access the FS:

ls -lh mnt/
drwxr-xr-x 1 root root 0 Apr 16  2024 Documents
drwxr-xr-x 1 root root 0 Apr 16  2024 Internal
drwxr-xr-x 1 root root 0 Apr 16  2024 Temp
...

And ultimately, unmount it again:

fusermount -u mnt/

Options

--user-name and --api-key-file

Use it to make sure you have access to restricted files and folders. If omitted, publicly visible files and folders will still show up.

--business-unit

If you have access to multiple Business Units, this allows to restrict what folders are visible. Use this when, across Business Units, root folder names (AKA domain names) aren't unique and multiple folders with the same name appear.

RUST_LOG= env. var.

Enable debug or trace logging:

RUST_LOG=debug toccofs mount ...

Features

Supported

  • list folders (readdir)
  • get file attributes (fstat)
  • read files (read)
  • rename and move (rename)
  • remove files and directories (unlink, rmdir)
  • create directories / domains (mkdir)

Unsupported

  • sync files (fsync)
  • write files (write)

Caveats

  • Performance

    Very little has been done to optimize performance. In particular, reads will be very slow. All download are currently synchronous with no other read-ahead then that managed by the OS.

  • Missing files:

    Some files or folders may not show up because they do not have a valid name. They may contains slashes or be the reserved names "." or "..".

  • Lost and found:

    In Tocco, it's possible for a folder/file to be visible but not it's parent directory. Such entries are visible in the hidden .lost+found directory:

    ls -lha mnt/
    ...
    drwxr-xr-x 1 root root   0 Jan  1  1970 .lost+found
    ...
    

    Names will have their ID prefixed to avoid name collisions.

Dependencies

~10–22MB
~308K SLoC