FUSE module

Status

The FUSE support is still in its early stage and may be (prone to bugs). acd_cli’s FUSE module has the following filesystem features implemented:

Feature Working
Basic operations
List directory
Read
Write [1]
Rename
Move
Trashing
OS-level trashing [2]
View trash
Misc
Automatic sync
ctime/mtime update
Custom permissions
Hard links partially [3]
Symbolic links [4]
[1]partial writes are not possible (i.e. writes at random offsets)
[2]restoring might not work
[3]manually created hard links will be displayed, but it is discouraged to use them
[4]soft links are not part of the ACD API

Usage

The command to mount the (root of the) cloud drive to the empty directory path/to/mountpoint is

acd_cli mount path/to/mountpoint

A cloud drive folder may be mounted similarly, by

acd_cli mount --modules="subdir,subdir=/folder" path/to/mountpoint

Unmounting is usually achieved by the following command

fusermount -u path/to/mountpoint

If the mount is busy, Linux users can use the --lazy (-z) flag. There exists a convenience action acd_cli umount that unmounts all ACDFuse mounts on Linux and Mac OS.

Mount options

For further information on the most of the options below, see your mount.fuse man page.

To convert the node’s standard character set (UTF-8) to the system locale, the modules argument may be used, e.g. --modules="iconv,to_code=CHARSET".

--allow-other, -ao
 allow all users to access the mountpoint (may need extra configuration)
--allow-root, -ar
 allow the root user to access the mountpoint (may need extra configuration)
--foreground, -fg
 do not detach process until filesystem is destroyed (blocks)
--interval INT, -i INT
 set the node cache sync (refresh) interval to INT seconds
--nlinks, -n calculate the number of links for folders (slower)
--nonempty, -ne
 allow mounting to a non-empty mount point
--read-only, -ro
 disallow write operations (does not affect cache refresh)
--single-threaded, -st
 disallow multi-threaded FUSE operations

Automatic remount

Linux users may use the systemd service file from the assets directory to have the clouddrive automatically remounted on login. Alternative ways are to add a crontab entry using the @reboot keyword or to add an fstab entry like so:

acdmount    /mount/point    fuse    defaults    0   0

For this to work, an executable shell script /usr/bin/acdmount must be created

#!/bin/bash

acd_cli mount $1

Please make sure your network connection is up before these commands are executed or the mount will fail.

Library Path

If you want or need to override the standard libfuse path, you may set the environment variable LIBFUSE_PATH to the full path of libfuse, e.g.

export LIBFUSE_PATH="/lib/x86_64-linux-gnu/libfuse.so.2"

This is particularly helpful if the libfuse library is properly installed, but not found.

Deleting Nodes

“Deleting” directories or files from the file system will only trash them in your cloud drive. Calling rmdir on a directory will always move it into the trash, even if it is not empty.

Logging

For debugging purposes, the recommended command to run is

acd_cli -d -nl mount -i0 -fg path/to/mountpoint

That command will disable the automatic refresh (i.e. sync) of the node cache (-i0) and disable detaching from the console.