• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

S3FS

May 6, 2021

s3fs allows Linux to mount S3 buckets as a file system.

Install s3fs.

sudo apt install s3fs

sudo apt install s3fs

Setup credentials.

echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > /etc/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs

echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > /etc/.passwd-s3fs chmod 600 ${HOME}/.passwd-s3fs

Mount it.

s3fs bucketname /mountpoint -o passwd_file=/etc/.passwd-s3fs

s3fs bucketname /mountpoint -o passwd_file=/etc/.passwd-s3fs

Mount it automatically.

bucketname /mountpoint fuse.s3fs _netdev,allow_other,passwd_file=/etc/.passwd-s3fs,rw,uid=1000,gid=1000 0 0

bucketname /mountpoint fuse.s3fs _netdev,allow_other,passwd_file=/etc/.passwd-s3fs,rw,uid=1000,gid=1000 0 0

Alternative.

s3fs#bucketname /mountpoint fuse _netdev,allow_other,use_cache=/root/cache,uid=1000,gid=1000,umask=022 0 0

s3fs#bucketname /mountpoint fuse _netdev,allow_other,use_cache=/root/cache,uid=1000,gid=1000,umask=022 0 0

Filed Under: Cloud Tagged With: bucket, file system, mount, s3, s3fs

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023