Linux command
bindfs 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Mount
sudo bindfs /path/to/source /path/to/mount
Example
sudo bindfs --map=user1/user2 /path/to/source /path/to/mount
Example
sudo bindfs --force-user=user --force-group=group /path/to/source /path/to/mount
Example
sudo bindfs --perms=0755 /path/to/source /path/to/mount
Example
bindfs -o ro /path/to/source /path/to/mount
Unmount
sudo umount /path/to/mount
说明
bindfs mounts a directory to another location with different ownership and permissions. It uses FUSE to create a view of a directory tree with modified permissions.
参数
- --map= _user1/user2_
- Map ownership from user1 to user2.
- --force-user= _user_
- Force all files to appear owned by user.
- --force-group= _group_
- Force all files to appear owned by group.
- --perms= _mode_
- Set permission bits for all files (octal or symbolic).
- --create-as-user
- Change owner/group of new files to the caller's uid/gid.
- --resolve-symlinks
- Resolve symbolic links in the source directory.
- --enable-ioctl
- Forward ioctl calls to the underlying filesystem.
- -r, -o ro
- Mount as read-only.
- -o _options_
- Pass FUSE mount options.
- --multithreaded
- Run bindfs in multithreaded mode.
FAQ
What is the bindfs command used for?
bindfs mounts a directory to another location with different ownership and permissions. It uses FUSE to create a view of a directory tree with modified permissions.
How do I run a basic bindfs example?
Run `sudo bindfs /path/to/source /path/to/mount` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --map= _user1/user2_ do in bindfs?
Map ownership from user1 to user2.