Skip to content

Instantly share code, notes, and snippets.

@taufiqibrahim
Created April 18, 2022 18:52
Show Gist options
  • Save taufiqibrahim/94958e50b8f5cdaab7040766f76882b8 to your computer and use it in GitHub Desktop.
Save taufiqibrahim/94958e50b8f5cdaab7040766f76882b8 to your computer and use it in GitHub Desktop.
# Install gcsfuse
export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
echo "deb http://packages.cloud.google.com/apt $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install gcsfuse
# Add this to /etc/fstab
# Create a file /ftpdata/key.json which contains service account JSON key
tibrahim-gcsfuse /ftpdata/ftpuser/buckets/<BUCKET_NAME> gcsfuse rw,_netdev,allow_other,uid=1001,gid=1002,key_file=/ftpdata/key.json
# Mount
sudo mount /ftpdata/ftpuser/buckets/<BUCKET_NAME>
# To unmount
sudo fusermount -u /ftpdata/ftpuser/buckets/<BUCKET_NAME>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment