Skip to content

S3FS使用手册

安装

Linux

  • CentOS 7
shell
#下载s3fs-fuse
sudo yum install -y s3fs-fuse

挂载

1.写配置文件

shell
echo $ak:$sk > .passwd
chmod 600 .passwd

2.挂载

  • 不开启debug
shell
s3fs 20001-testbucket /mnt/s3fs/  -o passwd_file=/home/testbucket/.passwd -o url=https://fgws3-ocloud.ihep.ac.cn -o use_path_request_style
  • 开启debug
shell
s3fs 20001-testbucket /mnt/s3fs/  -o passwd_file=/home/testbucket/.passwd -o url=https://fgws3-ocloud.ihep.ac.cn -o use_path_request_style   -o  curldbg -f

文件操作

列出桶中的所有文件

shell
ls

如果是在有图形界面的操作系统中,可以直接进入到该桶中,里面的对象都会列举出来

增加对象

shell
cp  srcfile destfile

在图形化界面中可以复制数据到桶中即可

如果出现权限拒绝,需要sudo启动s3fs,也需要sudo访问s3fs

删除文件

shell
rm fileName

修改文件名

shell
mv oldfilename newfilename