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.

3 Answers 3


Sorry, but such system-wide changes do require some form of root involvement, if just for sanity's sake. Perhaps the nearest to what you want is to create a virtual machine and play in it, or something like Fedora's mock, the mechanism used to create a chroot populated with the required tools to build a package. Probably other distributions have something similar. The whole namespace development in Linux promises help here, there is a series in LWN running now (part 1, part 2, part3, part 4; part 5 is still subscriber-only). But namespace setup will still be a root responsibility.

  • As I wrote it already works. I've been using this setup for quite some time. Using schroot and pyfilesystem I don't need root privileges anywhere. The only thing that does not work is the mentioned symlink part. Should I maybe rephrase my question to include something about symlinks?
    – ifschleife
    Feb 28, 2013 at 12:46
  • Thanks for the edit of the question but I think that this is not specific enough. The fact that I'm using this setup for development/compiling has nothing to do with the problem.
    – ifschleife
    Feb 28, 2013 at 12:49
  • @OrimKurowe, I don't see much other use of such a functionality, that's why I propose labelling the question that way.
    – vonbrand
    Feb 28, 2013 at 12:55
  • I do have use for that functionality and I'm hoping I'm not the only one...
    – ifschleife
    Feb 28, 2013 at 13:09
  • As I say, system-wide changes should not be in the hands of any random user who happens to be using the machine. To use the obligatory car analogy: sure, it would often come handy if I could just hop into the next car and drive off with it, but I suspect the owner won't be too happy about it.
    – vonbrand
    Feb 28, 2013 at 13:17

You can setup a full build/testing environment as a normal user by combining tools like fakechroot, fakeroot and cowdancer.


After searching some more I stumbled upon proot which combines chroot with the ability to mount any directory into the new root. It supports any file operation inside its chroot, yes even symlinks, that will happily work even after proot unmounted the directory. It doesn't need root privileges and made my complicated setup of schroot + pyfilesystem unnecessary.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .