Google 云存储桶:在具有全局权限的 Linux 实例中安装

Google Cloud Storage Buckets: Mounting in a Linux instance with Global Permissions

我已经创建了一个标准 Google 存储桶,我试图将其安装到 CentOS Linux 计算引擎实例中,但权限似乎不允许我授予访问权限root 用户以外的用户(一旦使用 gcsfuse 挂载,他们就可以读取和写入存储位置)。如果我尝试以非 root 用户身份挂载,gcsfuse 命令会说它已成功完成,但尝试读取或写入存储桶会导致 I/O 错误。如果任何人在 Linux 个实例中安装了 Google 个存储桶经验,我将不胜感激。

这是 GCSFuse 的预期行为,您可以使用 -o allow_other 标志覆盖权限,如前所述 here:

Permissions and ownership

Inodes

By default, all inodes in a gcsfuse file system show up as being owned by the UID and GID of the gcsfuse process itself, i.e. the user who mounted the file system. All files have permission bits 0644, and all directories have permission bits 0755 (but see below for issues with use by other users). Changing inode mode (using chmod(2) or similar) is unsupported, and changes are silently ignored.

These defaults can be overriden with the --uid, --gid, --file-mode, and --dir-mode flags.

Fuse

The fuse kernel layer itself restricts file system access to the mounting user (cf. fuse.txt). So no matter what the configured inode permissions, by default other users will receive "permission denied" errors when attempting to access the file system. This includes the root user.

This can be overridden by setting -o allow_other to allow other users to access the file system. Be careful! There may be security implications.