bindfs

Mount a directory to another location and alter permission bits.

bindfs is a FUSE filesystem for mounting a directory to another location, similarly to mount --bind. The permissions inside the mountpoint can be altered using various rules.

Examples

Here are some examples of what bindfs can do for you:

Docs

Installing

bindfs is available through the software repositories of many Linux distributions. Check there first unless there is a specific new feature that you need.

To compile from source on Linux, first apt install build-essential pkg-config libfuse3-dev (or libfuse-dev on older systems). On MacOS, install XCode and let it install Developer Tools, then pkg-config and either MacFuse or fuse-t.

Download the latest bindfs source code here: bindfs-1.17.7.tar.gz.

Compile and install bindfs: ./configure && make && sudo make install.

About

bindfs is developed and tested primarily on Linux with FUSE 2 and 3, but it has been reported to work reasonably well on MacOS with MacFuse and fuse-t, and on FreeBSD with fuse4bsd.

All FUSE filesystems necessarily incur a performance penalty in CPU time and memory consumption. If all you need is to make a directory read-only then mount --bind -r is more efficient.

bindfs was initially developed in 2006. I consider the program fairly feature-complete but I’ll still gladly fix bugs and add some small features as people suggest them.

There is an extensive (if dated) HowTo on Ubuntu Forums.

Bug reports

Bug reports, pull requests, comments and ideas are very welcome. Developement takes place on GitHub. Please use the issue tracker.

Known issues