mpartel / bindfs

Mount a directory elsewhere with changed permissions.
https://bindfs.org/
GNU General Public License v2.0
436 stars 64 forks source link

Unable to do bindfs / /mnt. #86

Open phokz opened 4 years ago

phokz commented 4 years ago

Hi, I am unable to do bindfs / /mnt.

root@clone:~# bindfs / /mnt  
root@clone:~# ls /mnt/mnt
#  freezes

Probably rsync-ish option -x, --one-file-system don't cross filesystem boundaries would solve this. Another option would be to have --exclude option

What I am trying to achieve is to make read-only mount accessible for specific user, to perform pull backups.

Is there any neat trick I am missing? The only workaround I have so far is:

find / -maxdepth 1 -type d | egrep -v ^/mnt | egrep -v ^/$| while read ln; do mkdir -p /mnt/$ln; echo bindfs $ln /mnt$ln; done

Downcases are evident:

mpartel commented 4 years ago

Sorry for the slow reply.

Possible workaround: --multithreaded - but there are several caveats:

-x or --exclude sound like good suggestions, but I'm unlikely to have time to work on them in the foreseeable future. If you feel like doing a pull request, --exclude should be fairly easy to implement by adding a check to process_path().