Encrypting Local folder

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.

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.

aah that explains it .. thank you!

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