2025-01-24, 06:11 PM
I spoke with a jellyfin dev who uses rclone. You need to add --default-permissions to your rclone command. Otherwise rclone won't enforce linux permissions.
They also recommended you create a service instead of relying on nohup.
They provided an example service file.
They also recommended you create a service instead of relying on nohup.
They provided an example service file.
Code:
# /etc/systemd/system/rclone.service
[Unit]
Description=Google Drive (rclone)
Requires=systemd-networkd.service
After=network-online.target
Wants=network-online.target
AssertPathIsDirectory=/media/cloud/
[Service]
Type=notify
KillMode=none
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
RestartSec=5
ExecStart=/usr/bin/rclone mount gdrivecrypt: /media/cloud \
--allow-other \
--default-permissions \
--uid 1005 \
--gid 1007 \
--dir-perms 777 \
--file-perms 666 \
--umask 002 \
--log-file /opt/rclone/logs/rclone.log \
--log-level NOTICE \
--dir-cache-time 5000h \
--drive-pacer-min-sleep 10ms \
--drive-pacer-burst 200 \
--poll-interval 30s \
--cache-dir=/opt/rclone/cache \
--drive-chunk-size 32M \
--vfs-cache-mode full \
--vfs-cache-max-size 350G \
--vfs-cache-max-age 15m \
--vfs-cache-poll-interval 5m \
--vfs-read-ahead 2G \
--vfs-read-chunk-size 32M \
--vfs-read-chunk-size-limit off \
--vfs-write-back 10m \
--bwlimit 8650k:off \
--transfers 3 \
--rc \
--rc-addr :5572 \
--rc-web-gui \
--rc-user USER \
--rc-pass PASS \
--bwlimit-file 20M
ExecStop=/bin/fusermount -uz /media/cloud
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 --rc-user=USER --rc-pass=PASS _async=true
Restart=on-failure
User=rclone
Group=rclone
[Install]
WantedBy=multi-user.target