kotoyuuko

CORE

昨日より、明日より、笑える今が一番大好き。
github
telegram
email

Mount Google Drive Shared Drive with Rclone

Recently migrated my email to Google's G Suite, planning to "reasonably" utilize the unlimited space of the team drive, so I dug out the Oracle Cloud small instance that has been idle for a few months.

The Ubuntu provided by Oracle Cloud has the firewall enabled by default, which may cause some mysterious issues, so let's disable it first:

apt purge netfilter-persistent
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F

Also, install the handy ufw:

apt install ufw
ufw allow ssh
ufw allow http
ufw allow https
ufw enable

Next, install fuse:

apt install fuse

Use Rclone's one-click script to install:

curl https://rclone.org/install.sh | sudo bash

Then configure the team drive that needs to be mounted using the rclone config command.

Mount using Systemd service:

[Unit]
Description=Rclone %i
AssertPathIsDirectory=LocalFolder
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount %i: /drive/%i \
 --umask 0000 \
 --default-permissions \
 --allow-non-empty \
 --allow-other \
 --buffer-size 32M \
 --dir-cache-time 12h \
 --vfs-read-chunk-size 64M \
 --vfs-read-chunk-size-limit 1G
ExecStop=/bin/fusermount -u LocalFolder
Restart=on-abort
User=root

[Install]
WantedBy=default.target

Start the service to mount it.

What? You ask me what can be done by mounting it? Experience it yourself!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.