Goofys
Updated at:2025-11-03
Tool overview
Goofys is a FUSE-based lightweight open source mounting tool developed in Go language for Linux and MacOS systems. It can mount BOS buckets to the local file system. Currently, it only supports a small number of POSIX file system functions, and is more suitable for read-only scenarios.
Main features
- Only sequential writing is supported; random writing is not supported.
- Symbolic links and hard links are not supported, and attributes like mode, owner, and group for files are not stored.
- Renaming directories containing more than 1,000 subdirectories is not supported.
- The creation time (ctime), access time (atime), and modification time (mtime) are always identical.
- Local cache is not utilized, ensuring close-to-open consistency.
Installation method
- Linux
Shell
1curl -SL https://github.com/kahing/goofys/releases/latest/download/goofys -o goofys
2chmod +x goofys
- macOS
Shell
1# Installation method I
2brew install --cask osxfuse
3brew install goofys
4# Installation method II
5export PATH=$PATH:$GOPATH/bin
6git clone https://github.com/kahing/goofys.git
7cd goofys
8make install
9goofys -v
Configure and mount
- Create access credential files and their directories
Shell
1mkdir ~/.aws
2vim ~/.aws/credentials
- Configure access AK/SK in the credentials file
Shell
1[default]
2 aws_access_key_id = BOS Access Key ID
3 aws_secret_access_key = BOS Secret Access Key
- Mount the BOS gs-bucket in the Beijing region to the local directory/mnt/bos-gs-bkt
Shell
1mkdir /mnt/bos-gs-bkt
2goofys --endpoint https://bj.bcebos.com gs-bucket /mnt/bos-gs-bkt
- Navigate to the /mnt/bos-gs-bkt directory to view the mount results, enabling direct read-write and list operations on objects within gs-bucket
Note
- MacOS brew installation of osxfuse may encounter version incompatibility issues
Error - The FUSE for MacOS installation package is not compatible with this version of MacOS. Refer to osxfuse documentation to manually install the correct version. Goofys also supports mounting a specific bucket prefix to a local directory by simply replacing it with <bucket:prefix>. - In Linux environments, mount operations require root permission. If not a root user, you must use sudo or run Goofys as a root user to perform the mount, otherwise an error will occur:
main.FATAL Unable to mount file system, see syslog for details. For detailed error log, refer to the /var/log/messages file. - Mounted mount target can be unmounted with the umount command, for example:
umount /mnt/bos-gs-bkt.
