iragoiko@debian:~/gdrive$ rclone listremotes
gdrive:
Config file "/home/iragoiko/.config/rclone.conf" not found
It is strange but if I start service with my user "iragoiko" does not say config file not found.
iragoiko@debian:~$ systemctl status rclone.service
● rclone.service - RClone Service
Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-10-24 22:53:41 CEST; 15s ago
Process: 9386 ExecStart=/usr/bin/rclone mount gdrive: /home/iragoiko/gdrive (code=exited, status=1/FAILURE)
Main PID: 9386 (code=exited, status=1/FAILURE)
iragoiko@debian:~$
Tried as root
root@debian:/home/iragoiko/.config/rclone# pwd
/home/iragoiko/.config/rclone
root@debian:/home/iragoiko/.config/rclone# ls
rclone.conf
root@debian:/home/iragoiko/.config/rclone#
file is there
really, i am not a expert that this.
you could add this to the command --config=/home/iragoiko/.config/rclone.conf
root@debian:/home/iragoiko/.config/rclone# ls -la
total 12
drwxr-xr-x 2 iragoiko iragoiko 4096 oct 24 22:12 .
drwxr-xr-x 3 iragoiko iragoiko 4096 oct 20 08:31 ..
-rw------- 1 iragoiko iragoiko 553 oct 24 22:12 rclone.conf
root@debian:/home/iragoiko/.config/rclone#```
i think that the systemd runs as root user.
root@debian:/etc/systemd/system# systemctl status rclone.service
● rclone.service - RClone Service
Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-10-24 23:39:45 CEST; 11s ago
Process: 11594 ExecStart=/usr/bin/rclone mount gdrive: /home/iragoiko/gdrive (code=exited, status=1/FAILURE)
Main PID: 11594 (code=exited, status=1/FAILURE)
oct 24 23:39:45 debian systemd[1]: Starting RClone Service...
oct 24 23:39:45 debian rclone[11594]: 2020/10/24 23:39:45 NOTICE: Config file "/home/iragoiko/.config/rclone.conf" not found - using defaults
oct 24 23:39:45 debian rclone[11594]: 2020/10/24 23:39:45 Failed to create file system for "gdrive:": didn't find section in config file
oct 24 23:39:45 debian systemd[1]: rclone.service: Main process exited, code=exited, status=1/FAILURE
oct 24 23:39:45 debian systemd[1]: rclone.service: Failed with result 'exit-code'.
oct 24 23:39:45 debian systemd[1]: Failed to start RClone Service.
root@debian:/etc/systemd/system#
is this permision correct?
-rw------- 1 iragoiko iragoiko 553 oct 24 22:12 rclone.conf
i do not know for sure. really, i am not an expert.
perhaps an expert will stop by but for now.
this is what i do, should work, chmod 777 /home/iragoiko/.config/rclone
and you can add the location of the rclone.conf file to the command
--config=/home/iragoiko/.config/rclone/rclone.conf
both actions applied. Same log:
● rclone.service - RClone Service
Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-10-25 00:00:41 CEST; 25s ago
Process: 3026 ExecStart=/usr/bin/rclone mount gdrive: /home/iragoiko/gdrive (code=exited, status=1/FAILURE)
Main PID: 3026 (code=exited, status=1/FAILURE)
oct 25 00:00:41 debian systemd[1]: Starting RClone Service...
oct 25 00:00:41 debian rclone[3026]: 2020/10/25 00:00:41 NOTICE: Config file "/home/iragoiko/.config/rclone.conf" not found - using defaults
oct 25 00:00:41 debian rclone[3026]: 2020/10/25 00:00:41 Failed to create file system for "gdrive:": didn't find section in config file
oct 25 00:00:41 debian systemd[1]: rclone.service: Main process exited, code=exited, status=1/FAILURE
oct 25 00:00:41 debian systemd[1]: rclone.service: Failed with result 'exit-code'.
oct 25 00:00:41 debian systemd[1]: Failed to start RClone Service.
Weird it can't even find the config file after giving the correct path. Can you check if your home directory is encrypted by any chance. If that's the case you will need to move your config to some other place.
I have nothing encripted. Just a normal config file... I do not know what to do
My service file is correct?
[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/iragoiko/.config/rclone.conf
ExecStart=/usr/bin/rclone mount gdrive: /home/iragoiko/gdrive
--config=/home/iragoiko/.config/rclone.conf
# This is for allowing users other than the user running rclone access to the mount
--allow-other \
# Google Drive is a polling remote so this value can be set very high and any changes are detected via polling.
--dir-cache-time 96h \
# The log level output
--log-level INFO \
# Location of the log file
--log-file /home/iragoiko/rclone/rclone.log \
# I reduce the poll interval down to 15 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 15s \
# This is setting the file permission on the mount to user and group have the same access and other can read
--umask 002 \
# The local disk used for caching
--cache-dir=/cache \
# This is used for caching files to local disk for streaming
--vfs-cache-mode full \
# This limits the cache size to the value below
--vfs-cache-max-size 30G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 336h \
# This sets up the remote control daemon so you can issue rc commands locally
--rc \
ExecStop=/bin/fusermount -uz /home/iragoiko/gdrive
Restart=on-success
RestartSec=5
[Install]
WantedBy=multi-user.target
In execstart add a backslash (\) whenever you start a new line. So add backslash after the --config ends and after the mount folder /home/iragoiko/gdrive
Edit: and remove the backslash after --rc since thats where the execstart ends.
Not sure if that is the reason but worth a shot.
[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/iragoiko/.config/rclone.conf
ExecStart=/usr/bin/rclone mount gdrive: /home/iragoiko/gdrive \
--config=/home/iragoiko/.config/rclone.conf \
# This is for allowing users other than the user running rclone access to the mount
--allow-other \
# Google Drive is a polling remote so this value can be set very high and any changes are detected via polling.
--dir-cache-time 96h \
# The log level output
--log-level INFO \
# Location of the log file
--log-file /home/iragoiko/rclone/rclone.log \
# I reduce the poll interval down to 15 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 15s \
# This is setting the file permission on the mount to user and group have the same access and other can read
--umask 002 \
# The local disk used for caching
--cache-dir=/cache \
# This is used for caching files to local disk for streaming
--vfs-cache-mode full \
# This limits the cache size to the value below
--vfs-cache-max-size 30G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 336h \
# This sets up the remote control daemon so you can issue rc commands locally
--rc
ExecStop=/bin/fusermount -uz /home/iragoiko/gdrive
Restart=on-success
RestartSec=5
[Install]
WantedBy=multi-user.target
Same output
rclone.service - RClone Service
Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-10-25 07:51:31 CET; 6s ago
Process: 3055 ExecStart=/usr/bin/rclone mount gdrive: /home/iragoiko/gdrive --config=/home/iragoiko/.config/rclone.conf --al
Main PID: 3055 (code=exited, status=1/FAILURE)
oct 25 07:51:31 debian systemd[1]: Starting RClone Service...
oct 25 07:51:31 debian systemd[1]: rclone.service: Main process exited, code=exited, status=1/FAILURE
oct 25 07:51:31 debian systemd[1]: rclone.service: Failed with result 'exit-code'.
oct 25 07:51:31 debian systemd[1]: Failed to start RClone Service.
I have reached my post limit
Which log do you want to see
root@debian:/var/log# ls
alternatives.log auth.log.1 daemon.log.1 dpkg.log kern.log messages syslog syslog.3.gz user.log
apt btmp debug faillog kern.log.1 messages.1 syslog.1 syslog.4.gz user.log.1
auth.log daemon.log debug.1 installer lastlog private syslog.2.gz unattended-upgrades wtmp
Since it does not give any reason for failure can you also share the log dump for the above?
Which log do you want to see?
root@debian:/var/log# ls
alternatives.log auth.log.1 daemon.log.1 dpkg.log kern.log messages syslog syslog.3.gz user.log
apt btmp debug faillog kern.log.1 messages.1 syslog.1 syslog.4.gz user.log.1
auth.log daemon.log debug.1 installer lastlog private syslog.2.gz unattended-upgrades wtmp
I do not know what to do to start this service file
Rclone config file is where it is suposed to be. Now with chmod 777 permision.
search the computer for all files named rclone.conf
root@debian:/home/iragoiko/gdrive# find / -name rclone.conf
/home/iragoiko/.config/rclone/rclone.conf
--config=/home/iragoiko/.config/rclone.conf
should be
--config=/home/iragoiko/.config/rclone/rclone.conf