s3fs-fuseをインストールする。
s3fs-fuseのインストール
ここに書いてある通りだが、macOSに関しては記述する。
https://github.com/s3fs-fuse/s3fs-fuse
$ brew cask install osxfuse
$ brew install s3fs
準備
やはり、ここに書いてある通りだが、記載する。
https://github.com/minio/cookbook/blob/master/docs/s3fs-fuse-with-minio.md
# アクセスキーとシークレットキーを保存
$ echo "access_key:secret_key" > s3cred
$ chmod 600 s3cred
# これをしないとマウント時に下記のエラーが出る
s3fs: credentials file s3cred should not have others permissions.
# マウント用のディレクトリを作成
$ mkdir test
マウント
<bucket>とhttp://minio-server:9000は設定した値を代入する。
-oで必要なオプションを追加する。uid, gidを設定しないと、root権限になる。
$ s3fs <bucket> test -o passwd_file=s3cred,use_path_request_style,url=http://minio-server:9000,allow_other,uid=$(id -u),gid=$(id -g)
確認
$ mkdir test/test
$ mc ls <host>/<bucket>
# testができていることを確認できるはず