1. 程式人生 > >阿里雲oss掛載伺服器

阿里雲oss掛載伺服器

 

使用說明

rpm -ivh https://github.com/aliyun/ossfs/releases/download/v1.80.5/ossfs_1.80.5_centos7.0_x86_64.rpm

echo testhhyp:賬號:密碼 > /etc/passwd-ossfs

chmod 640 /etc/passwd-ossfs


許可權問題
ossfs newhhyp /www/hh/abcd/ -ourl=oss-cn-shenzhen-internal.aliyuncs.com # root使用者

ossfs newhhyp /www/hh/abcd/ -ourl=oss-cn-shenzhen-internal.aliyuncs.com -ouid=1000 -ogid=1000 -oumask=007 -o allow_other # 1000表示www使用者


解除安裝

umount /www/hhyp/abcd/ # root user
fusermount -u /www/hhyp/abcd/ # non-root user