百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gcsf

> 编程语言
开源

基于 Google Drive 的 FUSE 文件系统

2.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

基于 Google Drive 的 FUSE 文件系统


GCSF is a virtual filesystem that allows users to mount their Google Drive account locally and interact with it as a regular disk partition. You can find out more in this [paper](https://harababurel.com/thesis.pdf)

Requirements

GCSF requires the stable branch of the Rust programming language, which can be installed following the instructions on rustup.rs. If you already have Rust installed, make sure that it is updated to the latest version:

bash
$ rustup update stable

OSX

On Mac OSX, GCSF requires osxfuse and pkg-config:

bash
$ brew update; brew install pkg-config; brew tap homebrew/cask; brew install --cask osxfuse

Ubuntu / Debian

On Ubuntu / Debian, GCSF requires libfuse-dev, libssl-dev and pkg-config:

bash
sudo apt-get install -y fuse3 libfuse-dev libssl-dev pkg-config

Fedora

On Fedora, GCSF requires gcc, fuse3-devel, and pkg-config:

bash
sudo dnf install -y gcc fuse3-devel pkg-config

Arch Linux

An AUR package is maintained by axionl: gcsf-git.

SUSE

bash
sudo zypper install -y fuse-devel fuse rust pkgconf-pkg-config

Other linux distros

Make sure you have pkg-config and the fuse library installed. These are usually found in the package repositories of major distributions.

FreeBSD

Rust can be installed via the lang/rust port. You will need to install sysutils/fusefs-libs for the cairo install command to succeed.

Windows

Unfortunately, Windows is not supported at the time being. See issue #19.

Installation

After all requirements are met, GCSF can be installed using cargo:

bash
$ cargo install gcsf

This will generate the gcsf binary in $HOME/.cargo/bin. Make sure that this directory is in your PATH variable: export PATH=$PATH:$HOME/.cargo/bin

Alternatively, you can download a release binary for your platform.

Configuration

GCSF will attempt to create a configuration file in $XDG_CONFIG_HOME/gcsf/gcsf.toml, which is usually defined as $HOME/.config/gcsf/gcsf.toml. Credentials are stored in the same directory.

GCP

  1. Visit console.developers.google.com and create a new project
  2. Add the Google Drive API to the project
  3. Configure an OAuth consent screen. Verification should not be required. Should be external unless this project is something internal to your GSuite
  4. Configure an OAuth2.0 credential. Do not use WEB as the token type if adding gcsf to a headless server - you want to be using the urn:* URI (note: if using WEB, you'll need to set the accepted domains to include http://localhost:8081)
  5. Configure GCSF to use the new client_id, client_secret, and project_id. You should have all these values after creating the credential.
  6. Configure GCSF authorize_using_code=True if configuring for headless servers. If you do this, completing the OAuth flow in a different browser will provide you a code that you can give to GCSF.

Running gcsf login some_session_name at this point should show a URL with your client_id query parameter.

Publishing to GCP app to Production Mode (Optional, important for long-running services)

If you plan to run GCSF as a system service or for extended periods, it is recommended that your Google Cloud project be in Production mode, not Testing mode.

Access tokens for apps in Testing mode expire more frequently, which usually triggers a prompt on GCSF to re-authenticate. This can be inconvenient especially when running GCSF as a system service. Publishing the app to Production mode resolves this issue.

To publish your app:

  1. Go to Google Cloud Console
  2. Navigate to "APIs & Services" → "OAuth consent screen" -> "Audience"
  3. Check the "Publishing status" at the top
  4. If it says "Testing", click "Publish App"
  5. Publishing to Production might require app verification. Follow the process in the "Verification centre" section.
  6. After publishing, you must re-authenticate:
    bash
    gcsf logout your_session_name
    gcsf login your_session_name

Note: Publishing to Production does NOT require Google verification for personal use. Verification is only needed if you're distributing your app to many external users.

You can verify your authentication is working at any time:

bash
$ gcsf verify your_session_name
Verifying authentication for session 'your_session_name'...
Authentication is valid.

Usage

The first step is to log in to Drive and authorize the application. A name must be provided for the session:

bash
$ gcsf login some_session_name
Please direct your browser to https://accounts.google.com/o/oauth2/[...] and follow the instructions displayed there.
Successfully logged in. Saved credentials to "$HOME/.config/gcsf/some_session_name"

You can also list all existing sessions:

bash
$ gcsf list
Sessions:
        - personal
        - some_session_name
        - work

And then mount one (or more) of them:

bash
$ gcsf mount /mnt/gcsf -s some_session_name
INFO  gcsf > Creating and populating file system...
INFO  gcsf > File system created.
INFO  gcsf > Mounting to /mnt/gcsf
INFO  gcsf > Mounted to /mnt/gcsf

You can now find the contents of your Drive account in /mnt/gcsf:

Using Ranger:

Or Thunar:

Why GCSF?

GCSF stands for "Google Conduce Sistem de Fișiere" which translated from Romanian is "Google Drive Filesystem". However GDFS already exists so it remains GCSF.

Troubleshooting

Could not mount to $mountpoint: Operation not permitted (os error 1)

This error occurs when user_allow_other is not set in /etc/fuse.conf or the file has improper permissions. Fix by running (as root):

bash
# echo 'user_allow_other' >> /etc/fuse.conf
# chmod 644 /etc/fuse.conf
# sudo chown root:root /etc/fuse.conf

libssl.so.1.0.0

You installed the prebuilt binaries but couldn't run it. Fix by installing rust and building from source.

Contributing

Contributions are welcome. Documentation available on docs.rs/gcsf. You can also help by reporting or fixing issues.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustdrivefilesystemfusegoogle

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言