linux - 谷歌云存储桶: Mounting in a Linux instance with Global Permissions

标签 linux google-cloud-storage google-compute-engine gcsfuse

我已经创建了一个标准的 Google 存储桶,我正尝试将其挂载到 CentOS Linux 计算引擎实例中,但权限似乎不允许我向除根用户(可以读取数据的用户)以外的用户授予访问权限并在使用 gcsfuse 安装后写入存储位置)。如果我尝试以非 root 用户身份挂载,gcsfuse 命令会显示已成功完成,但尝试读取或写入存储桶会导致 I/O 错误。我非常感谢任何具有在 Linux 实例中安装 Google 存储桶经验的人的指导。

最佳答案

这是 GCSFuse 的预期行为,您可以使用 -o allowed_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.

关于linux - 谷歌云存储桶: Mounting in a Linux instance with Global Permissions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39731266/

相关文章:

google-compute-engine - 在只读模式下安装GDE磁盘时出现NoDiskConflict

linux - Unix 文件系统 : How are file names translated to disk sectors?

php -/usr/local/bin/中 Composer 的权限被拒绝

php - 谷歌服务账户认证 PHP

python - 从 Python 将 TFRecord 输出到 Google Cloud Storage

google-compute-engine - 无法禁用 Google API

linux - 报告 301 时将页面重定向到另一个页面

c# - 是否可以在 unix 上使用 WPF?

python - 如何将 Google Cloud Storage base64 md5sum 转换为十六进制版本?

google-compute-engine - 从负载均衡器获取 Orgin IP