- 安裝s3fs-fuse
yum install epel-release
yum install s3fs-fuse
- 設置oss所使用的AccessKey和AccessSecretKey
echo ${ACCESS_KEY}:${SECRET_ACCESS_KEY} > ${HOME}/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs
- 掛載oss至文件系統(tǒng)
s3fs ${BUCKET} ${MOUNT_POINT} -o passwd_file=${HOME}/.passwd-s3fs -o url=https://${URL_TO_S3}/ -o umask=0000
umash用于設置目錄的操作權限