aliyun / ossfs

Export s3fs for aliyun oss.
GNU General Public License v2.0
738 stars 152 forks source link

使用 s3fs 替代 ossfs #137

Open weaming opened 4 years ago

weaming commented 4 years ago

From macOS挂载阿里云OSS | 万骏的博客

Replace ossfs with s3fs

Setup

brew cask install osxfuse  # then reboot to take effect
brew install s3fs

The format of $HOME/.passwd-s3fs: $AccessKeyID:$AccessKeySecret

fish shell to mount and unmount:

function s3fs-mount-oss -a unmount
    set -l mountpoint $HOME/Downloads/oss
    if not test -z $unmount
        diskutil unmount $mountpoint
    end

    s3fs weaming-files:/s3fs $mountpoint \
        -o url=https://oss-cn-shenzhen.aliyuncs.com \
        -o passwd_file=$HOME/.passwd-s3fs \
        -o use_cache=$HOME/.cache/oss
end