Rclone keeps crashing with you provided 4 non flag arguments

What is the problem you are having with rclone?

Command mount needs 2 arguments maximum: you provided 4 non flag arguments: ["WnD:" "/home/t0x1c/gdrive" "ExecStop=/bin/fusermount" "/home/t0x1c/gdrive"]

What is your rclone version (output from rclone version)

Which OS you are using and how many bits (eg Windows 7, 64 bit)

rclone v1.56.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.11.0-27-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.5
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The rclone config contents with secrets removed.

[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/t0x1c/.config/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount WnD: /home/t0x1c/gdrive \

--allow-other
--dir-cache-time 1h
--log-file /home/t0x1c/rclone.log
--log-level INFO
--poll-interval 10s
--umask 002
--rc
--rc-addr :5572
--rc-no-auth
--cache-dir=/cache
--drive-pacer-min-sleep 10ms
--drive-pacer-burst 200
--vfs-cache-mode full
--vfs-cache-max-size 50G
--vfs-cache-max-age 24h
--vfs-cache-poll-interval 5m
--vfs-read-ahead 2G
ExecStop=/bin/fusermount -u /home/t0x1c/gdrive
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 _async=true
Restart=on-failure

[Install]
WantedBy=multi-user.target

rclone log shows me this error:

Command mount needs 2 arguments maximum: you provided 4 non flag arguments: ["WnD:" "/home/t0x1c/gdrive" "ExecStop=/bin/fusermount" "/home/t0x1c/gdrive"]

hello and welcome to the forum,

not an expert at this, but is there a blank line in the ExecStart command?
and the end of each line needs a trailing \

ExecStart=/usr/bin/rclone mount WnD: /home/t0x1c/gdrive \

    --allow-other 

here at the forum, this is the systemd file, most rcloners use.
your file should be formatted the same as it.
https://github.com/animosity22/homescripts/blob/master/systemd/rclone.service

Hi,

thanks for the reply.

I used the template and adhered to it as far as possible, there are no spaces between the flags / commands, just something with blockquote.

I have pasted it for a better overview at Pastebin.

On the last line, you need to remove the \

--vfs-read-ahead 2G \

that one.

1 Like

Thanks! You saved my sleep.

.. I've spent the last 3 hours trying to find the fault, and I've been desperate.

I still have a non-topic-related question, and I often have the problem that the permession of "rclone.conf" is changed, i.e. rclone spits out "permession denied", what could be the reason?

That's usually if you ran it as root and are running a regular user now.

Check the permissions on the file:

felix@gemini:~$ rclone config file
Configuration file is stored at:
/opt/rclone/rclone.conf
felix@gemini:~$ ls -al /opt/rclone/rclone.conf
-rw------- 1 felix felix 900 Aug 24 20:50 /opt/rclone/rclone.conf
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.