FreshMIke
(FreshMike)
January 17, 2021, 2:22am
1
Hi All
I'm trying to encrypt a local folder. What's the right config ?
There doesn't seem to be a remote or path option on the [local] setting.
I tried this:
[my-disk1-encrypt]
type = crypt
remote = /srv/dev-disk-by-label-disk1/DATA
filename_encryption = obfuscate
directory_name_encryption = true
and then with the Rclone systemctl service to mount it:
ExecStartPre=/usr/bin/rclone mount my-disk1-encrypt: /mnt/my_disk1 \
--timeout 5m
Rclone is starting up but the systemd service is not returning the command, and timeout after 5min.
In the meantime I can create files and I see them encrypted. So what am I missing here ? Why is the systemd service not returning control and timing out ?
Hi, welcome to the forum!
You did not share the rest of your systemd configuration, but assuming you have not configured it with Type=notify
you should try that.
Rclone detects whether it is running under systemd and sends the sdnotify automatically when the mount is up.
FreshMIke
(FreshMike)
January 17, 2021, 12:53pm
3
Hi thanks for the info. I already have this set:
[Unit]
Description=Rclone Service
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/mediadownloader/.config/rclone/rclone.conf
KillMode=none
RestartSec=7
ExecStartPre=/usr/bin/rclone mount my-disk1-encrypt: /mnt/my_disk1 \
--timeout 5m \
--log-level INFO
ExecStart=/usr/bin/rclone mount gcrypt: /home/mediadownloader/mnt/google \
--allow-other \
--allow-non-empty \
--cache-db-purge \
--buffer-size 32M \
--use-mmap \
--dir-cache-time 44h \
--drive-chunk-size 16M \
--timeout 1h \
--no-modtime \
--log-level INFO \
--vfs-cache-mode minimal \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit 1G
ExecStop=/bin/fusermount -u /mnt/my_disk1
ExecStop=/bin/fusermount -u /home/mediadownloader/mnt/google
Restart=on-failure
User=mediadownloader
Group=users
[Install]
WantedBy=multi-user.target
You really want 2 separate service files as you want one for each item you are mounting.
The Pre command doesn't fork/finish so it never completes.
FreshMIke
(FreshMike)
January 17, 2021, 3:33pm
5
aah that explains it .. thank you!
system
(system)
Closed
March 19, 2021, 11:33am
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.