From ee47469b2d5ea3f3017a05c5bf15f7c79be1606f Mon Sep 17 00:00:00 2001 From: darkdragon-001 Date: Tue, 19 May 2020 18:33:28 +0200 Subject: [PATCH] "fuse.subtype" type is preferred over "subtype#" prefix --- rclone-fstab-mount-helper-script.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/rclone-fstab-mount-helper-script.md b/rclone-fstab-mount-helper-script.md index 3fccf56..bf69424 100644 --- a/rclone-fstab-mount-helper-script.md +++ b/rclone-fstab-mount-helper-script.md @@ -36,6 +36,7 @@ To enable mounting a volume using rclone via an entry in fstab the following hel # exec rclone trans="$trans $remote $mountpoint" # NOTE: do not try "mount --daemon" here, it does not play well with systemd automount, use '&'! + # NOTE: mount is suid and ignores pre-set PATHs -> specify explicitely PATH=$PATH rclone mount $trans /dev/null 2>/dev/null & # WARNING: this will loop forever if remote is actually empty! @@ -43,23 +44,21 @@ To enable mounting a volume using rclone via an entry in fstab the following hel sleep 1 done +## fstab -Then in `/etc/fstab` you can add something like: +In `/etc/fstab` you can add something like: - rclonefs#remote:/path/to/remote/folder /mnt/rclone fuse config=/home/user/.rclone.conf,allow-other,default-permissions,read-only,max-read-ahead=16M 0 0 + remote:/path/to/remote/folder /mnt/rclone fuse.rclonefs config=/home/user/.rclone.conf,allow-other,default-permissions,read-only,max-read-ahead=16M 0 0 Obviously, replace `/home/user/.rclone.conf` with the path to your config and replace `remote:/path/to/remote/folder` with the name of your remote the path you want to mount. -#### Important: -- rclonefs wrapper has to be in the PATH=/usr/local/bin:/usr/bin. mount is suid and doesn't ignores pre-set PATHs. Similarly, rclone invocation fails to find fusermount if not invoked with PATH=$PATH explicitly set. - ## autofs You can use the above mount wrapper with autofs, but note you **must** supply the `--allow-non-empty` option otherwise autofs will lock up entering the mount (see [#3246](https://github.com/ncw/rclone/issues/3246)). An example config entry for autofs might look like this: - remote -fstype=fuse,config=/home/$USER/.config/rclone/rclone.conf,allow-other,allow-non-empty :rclonefs#remote: + remote -fstype=fuse.rclonefs,config=/home/$USER/.config/rclone/rclone.conf,allow-other,allow-non-empty :remote: ## systemd @@ -72,9 +71,9 @@ Alternatively if you're a `systemd` convert and want more control over when rclo After=network-online.target [Mount] - What=rclonefs#remote:/path/to/remote/folder + What=remote:/path/to/remote/folder Where=/mnt/rclone - Type=fuse + Type=fuse.rclonefs Options=auto,config=/home/user/.rclone.conf,allow-other,default-permissions,read-only,max-read-ahead=16M TimeoutSec=30