Exists a linux vfs device that permits bind a directory site in various area (like mount-- bind) in customer room?

For a customer process, I intend to mount a directory site in various other area yet in customer room without origin privilieges. Something like mount-- bind/ beginning/ dest, yet with a vfs wrapper. Like a usermode fine-tuned chroot.

The program would certainly wrapper the syscalls to documents to "replace" the courses required. Maybe called with a command line like:

bindvfs/ fake-home:/ residence ls/ residence

I make certain that this alredy exists! :)

0
2019-05-04 23:04:07
Source Share
Answers: 2

VFS currently permits non - origin placing of filesystems. You can add the user or users alternative to the fstab access and also see to it vfs.usermount=1 remains in /etc/sysctl.

None of this will certainly offer you chroot - like controls nonetheless. The bind alternative isn't mosting likely to transform approvals or permit an 'alternate' accessibility, this is a 2nd mtab access for the very same specific filesystem and also materials. Alterations in the bind mount influence the initial.

I would certainly see to it you clarify your objective prior to relocating better.

0
2019-05-08 07:43:54
Source

The parrot program can do what you request for : obstruct system telephone calls and also reroute particular courses (as an example, all courses beginning with /anonftp are remapped to transparently accessibility remote documents over FTP). It additionally runs totally in userspace.

Nonetheless, regardless of a remarkable array of usual and also unusual network methods, parrot does not have any kind of component to do straightforward filesystem - > filesystem revising like you request for. That need to be fairly straightforward to add, if you recognize some C language shows.

Conversely, bindfs (which. work on top of FUSE), functions like a. mount --bind in userspace. (But this enters the reverse instructions. about re - routing /home to /fake-home as you state in your inquiry.)

0
2019-05-08 07:36:13
Source