Search code examples
linuxchroot

Is there any way to chroot a linux filemanager?


Just wondering for an idea if it would be possible for a filemanager like xfe, rox, nautilus to be able to run (at launch) with chroot aka not being able to go down the tree.

I would be interested if anyone has an idea on how to do so; it's for a cybercoffe where I don't want people to access other directories.

(solution except using linux fs permission).


Solution

  • Your file manager will need to see and access of the special files you are trying to hide (such as /proc content and /dev content) in order to work properly.

    So yes, you can run a file manager in a chroot, but you need to put (a minimal version of) /dev/ and /proc in the chroot for it to work.

    I would either hack the source of the file manager to hide what you want or go all the way and run the file manager in a virtual machine so no damage can be done by end user to real computing resources. qemu/kvm is excellent for that.