Skip to main content

How to mount Creating a local directory to another local directory without changing fstabworkspace for development/testing

Source Link
ifschleife
  • 273
  • 1
  • 2
  • 5

How to mount a local directory to another local directory without changing fstab

I want to be able to mount, say /home/$USER/workspace to /usr/local/workspace. Right now I'm using the python package pyfilesystem which uses fuse to do that. My problem is, that inside that mount I am not able to create symlinks. I don't even need symlinks going outside the mount, but even a symlink that normally is created for a shared library during compilation, will not be created inside the mount.

So I'm either looking for a totally different approach, or a tool (preferably written in Python) that does exactly what pyfilesystem is doing and supports the creation of symlinks.

Further constraints:

  • Using a simple symlink instead of a mount does not work for me as the mounted directory will actually be inside a chroot.
  • Mounting must not require root privileges.
  • Changing fstab is not an option.
  • Thus using mount bind is not an option.