kernel - Directory remapping between users or processes on Linux? -


for example, want redirect directory /data between users. when user1 access /data, accesses /data1 actually. when user2 access /data, accesses /data2 actually.

what technology should use? cgroups? unionfs? others? i'm sorry i'm newbie.

more advanced, redirection between processes. process1 accesses /data1 /data , process2 accesses /data2 /data . how can that?

there linux filesystem namespaces can want. create new namespace , mount /data inside bind mount real /data1 or /data2.

however, kind of tricky right now, far know, , needs lot of tooling linux distros may not using.

most unix software uses environment variables find data directories. in this, you'd have

export jacksprogramdata=/data1 

in user's $home/.profile (or .bash_profile), , jacksprogram use getenv(jacksprogramdata) read value.


Comments