Fabio
June 12, 2023, 9:42am
1
Hi, I am using rclone on Rasberry (Bullseye) with GDrive and all seems to work.
This is my version:
rclone v1.62.2
- os/version: raspbian 11.7
- os/kernel: 6.1.21-v7+ (armv7l)
- os/type: linux
- os/arch: arm (ARMv7 compatible)
- go/version: go1.20.2
- go/linking: static
- go/tags: none
Today I was trying to test logging. So I launched the command:
rclone mount --daemon GDrive: /home/boss/GDrive --allow-non-empty --log-file=/home/boss/rclone.log
The share got correctly mounted, but in the log file I found this:
2023/06/12 11:39:17 mount helper error: fusermount3: failed to access mountpoint /home/boss/GDrive: Permission denied
2023/06/12 11:39:17 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
What's the meaning?
try again with -vv
option and post all log
Fabio
June 12, 2023, 10:30am
3
This is the log with -vv
option:
2023/06/12 11:39:17 mount helper error: fusermount3: failed to access mountpoint /home/boss/GDrive: Permission denied
2023/06/12 11:39:17 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
2023/06/12 12:29:46 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "mount" "--daemon" "GDrive:" "/home/boss/GDrive" "--allow-non-empty" "--log-file=/home/boss/rclone.log" "-vv"]
2023/06/12 12:29:46 DEBUG : Creating backend with remote "GDrive:"
2023/06/12 12:29:46 DEBUG : Using config file from "/home/boss/.config/rclone/rclone.conf"
2023/06/12 12:29:46 DEBUG : rclone: Version "v1.62.2" finishing with parameters ["/usr/bin/rclone" "mount" "--daemon" "GDrive:" "/home/boss/GDrive" "--allow-non-empty" "--log-file=/home/boss/rclone.log" "-vv"]
2023/06/12 12:29:47 DEBUG : rclone: Version "v1.62.2" starting with parameters ["/usr/bin/rclone" "mount" "--daemon" "GDrive:" "/home/boss/GDrive" "--allow-non-empty" "--log-file=/home/boss/rclone.log" "-vv"]
2023/06/12 12:29:47 DEBUG : Creating backend with remote "GDrive:"
2023/06/12 12:29:47 DEBUG : Using config file from "/home/boss/.config/rclone/rclone.conf"
2023/06/12 12:29:47 DEBUG : Google drive root '': Mounting on "/home/boss/GDrive"
2023/06/12 12:29:47 mount helper error: fusermount3: failed to access mountpoint /home/boss/GDrive: Permission denied
2023/06/12 12:29:47 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
This is strange given that you say that all works - I am puzzled.
I have tested on my RPi and I do not see such errors.
Fabio
June 12, 2023, 11:38am
5
Don't know if it could help, but I have installed fuse3 a couple of days ago, when I upgraded rclone to latest version.
Fabio
June 12, 2023, 11:39am
6
If I remove the --log-file
option, I don't get any errors:
rclone mount --daemon GDrive: /home/boss/GDrive --allow-non-empty -vv
2023/06/12 13:39:06 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "mount" "--daemon" "GDrive:" "/home/boss/GDrive" "--allow-non-empty" "-vv"]
2023/06/12 13:39:06 DEBUG : Creating backend with remote "GDrive:"
2023/06/12 13:39:06 DEBUG : Using config file from "/home/boss/.config/rclone/rclone.conf"
2023/06/12 13:39:06 DEBUG : rclone: Version "v1.62.2" finishing with parameters ["/usr/bin/rclone" "mount" "--daemon" "GDrive:" "/home/boss/GDrive" "--allow-non-empty" "-vv"]
as you are using --daemon
check if you do not have multiple rclone mount
instances running, run:
ps -ef | grep rclone
Fabio
June 12, 2023, 11:52am
8
No, just one:
ps -ef | grep rclone
boss 12014 1 0 11:22 ? 00:00:07 /usr/bin/rclone mount --daemon GDrive: /home/boss/GDrive --allow-non-empty --log-file=/home/boss/rclone.log
boss 12693 12585 0 13:51 pts/1 00:00:00 grep --color=auto rclone
yes so this is why now you do not see errors... I have just tried myself
rclone mount --daemon
then if I run rclone mount
again I see:
2023/06/12 13:52:20 mount helper error: fusermount3: failed to access mountpoint /pidata/mount: Permission denied
2023/06/12 13:52:20 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
This is why using systemd is better - it wont allow it. When you use --daemon
you have to make sure yourself there there is no other instance running already.
Fabio
June 12, 2023, 11:56am
10
How to run it in systemd? When run as a process, do I still need to mount the share?
as root create /etc/systemd/system/rcloneGmount.service
[Unit]
Description=RClone GDrive mount
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/boss/.config/rclone/rclone.conf
RestartSec=5
ExecStart=/usr/bin/rclone mount GDrive: /home/boss/GDrive \
--log-file=/home/boss/rclone.log \
--log-level DEBUG
ExecStop=/bin/fusermount3 -uz /home/boss/GDrive
Restart=on-failure
User=boss
Group=boss
[Install]
WantedBy=multi-user.target
now reload services:
sudo systemctl daemon-reload
To start/stop/status your mount:
sudo systemctl start rcloneGmount
sudo systemctl stop rcloneGmount
sudo systemctl status rcloneGmount
to start/not automatically after reboot:
sudo systemctl enable rcloneGmount
sudo systemctl disable rcloneGmount
1 Like
Fabio
June 12, 2023, 12:06pm
12
can I save the log in /var/log? I am afraid it won't, as permissions issues..
And here a bit more complex example including cache warming:
of course you can - just get permissions right - you find info easy on google
Fabio
June 12, 2023, 12:26pm
15
Did it. Thanks.
Last one: is it better to use rsync
or rclone copy
?
There is no easy answer:
https://www.clusterednetworks.com/blog/post/rsync-vs-rclone-what-are-differences
to sync folders locally or over ssh I would use rsync - much faster over network than rclone
but when you add cloud to the equation you have to use rclone - rsync does not support cloud services
I use both at the end:) you need right tool for the job. And jobs are not the same.
1 Like
crude way would be to run rclone as root and use --allow-other
option in your serviced command.
much better way would be to have rclone user only used to run rclone - and add rclone user to the group with permissions to write to /var/log
Fabio
June 12, 2023, 12:45pm
18
I did it this way:
sudo touch /var/log/rclone.log
sudo chown boss:boss /var/log/rclone
Quick&Dirty
As long as you know that it is Quick&Dirty
then all is good:)
Fabio
June 12, 2023, 12:50pm
20
Yes. Because I don't want the user to get permission to write in the whole /var/log folder, but just on that specific file.