Skip to content

Commit e613402

Browse files
committed
README.md
1 parent f2e7bd5 commit e613402

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,30 @@ cosfs appid:my-bucket /tmp/cosfs -ourl=http://cn-south.myqcloud.com -odbglevel=i
8080
fusermount -u /tmp/cosfs # non-root user
8181
```
8282

83+
84+
如何使用STS(临时密钥)来挂载bucket
85+
86+
```
87+
参考挂载示例
88+
./cosfs 1252448703:rabbitliu /mnt/rabbit/ -ourl=http://cn-south.myqcloud.com -odbglevel=info -oallow_other -ocam_role=sts -opasswd_file=/tmp/passwd-jimmy-sts
89+
90+
其中 -ocam_role=sts 是必须的参数
91+
92+
-opasswd_file 含义和之前一致,文件名和路径可以任意指定
93+
但是文件内容需要以以下格式提供
94+
COSAccessKeyId=AKID5yc1B6BEwRikX8gaQ1NTIrAE2ay92mFS
95+
COSSecretKey=80e1A3h5FBtNbcPxGPL3ZqthFYdU6TbY
96+
COSAccessToken=109dbb14ca0c30ef4b7e2fc9612f26788cadbfac3
97+
COSAccessTokenExpire=2017-08-29T20:30:00
98+
99+
其中COSAccessTokenExpire 代表临时token过期时间,本地时间,格式需要和例子中一致
100+
cosfs会根据这个时间来判断是否要重新加载配置来获取到最新的配置
101+
102+
其它三个参数需要向CAM申请获取
103+
104+
105+
```
106+
83107
### 局限性
84108

85109
cosfs提供的功能和性能和本地文件系统相比,具有一些局限性。具体包括:

0 commit comments

Comments
 (0)