首页 > 解决方案 > 无法读取 gcsfuse 挂载磁盘上的文件

问题描述

我以前能够做到这一点,所以我知道它有效。无论如何,我运行了命令

sudo gcsfuse deduction3 /mnt/disks/temp_dir
Using mount point: /mnt/disks/temp_dir
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.

然后我跑了

kylefoley@kfoley76:/mnt/disks/temp_dir$ ls

但什么都没有出现。该存储桶上有 3 个文件和 1 个文件夹。


更新


我还尝试运行 python os.listdir(path),这就是我最终将使用的。但这最终没有产生任何结果。

标签: google-cloud-platformgoogle-cloud-storagegcsfuse

解决方案


我犯的错误是目录在我挂载之前没有足够的权限。通过在运行sudo chmod 777 /mnt/disks/temp_dir4之前运行,gcsfuse我解决了问题。


推荐阅读