Using a FUSE-mounted directory as a docker volume

Solution 1:

Although this is an old question I recently had the same problem. It was trying to use a directory inside a fuse mount as a volume in docker-compose. The fuse mount was created by the seadrive-daemon (from the Seafile project) but the found solution is pretty standard.

The problem is that root doesn't have access to the fuse mount. You can check this by login in as root and performing a simple ls of the folder in question. You need to mount the fuse drive with the option "allow_root". Either in /etc/fstab or in my case passing the option to the seadrive-daemon with -o allow_root.

In order to be able to even use the allow_root option as non-root user you must enable it in /etc/fuse.conf by uncommenting or adding the following line:

user_allow_other