1

我将一些文件上传到 S3,我想在 EC2 实例中访问它们。我正在尝试让 s3fs 工作。我通过 SSH 连接到我的 EC2 实例,然后使用以下命令在本地文件夹上安装了一个 S3 存储桶/mnt/s3

s3fs -o allow_other -o uid=1000,gid=1000,use_cache=/home/ubuntu/cache arte-mexicano /mnt/s3

allow_other即使没有选项,我也可以看到文件没有问题。当我使用时,文件大小也可以ls -l,但是当我尝试查看一些随机文本文件时,我得到一个错误:

ubuntu@some-ip:/mnt/s3/some-folder$ cat README.md
cat: README.md: Bad file descriptor

我也尝试用 Vim 打开它,但没有成功。该allow_other选项也没有解决我的问题。

欢迎任何想法!

编辑 1

@AndrewGaul 要求:

使用双重调试选项 (-d -d):

ubuntu@some-ip:/mnt$ s3fs -d -d -o allow_other -o uid=1000,gid=1000,use_cache=/home/ubuntu/cache arte-mexicano /mnt/s3
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.22
flags=0x0000f7fb
max_readahead=0x00020000
   INIT: 7.19
   flags=0x00000019
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40

使用双重调试加 -f:

ubuntu@some-ip:/mnt$ s3fs -d -d -f -o allow_other -o uid=1000,gid=1000,use_cache=/home/ubuntu/cache arte-mexicano /mnt/s3
s3fs_check_service
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.22
flags=0x0000f7fb
max_readahead=0x00020000
s3fs_init
   INIT: 7.19
   flags=0x00000019
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40
s3fs_destroy

我在这两种情况下都得到了类似的日志,但我不太明白它们的意思。两者都挂在那里,直到我用 ctrl+C 停止它们,之后都没有安装。

4

0 回答 0