Note that there are some explanatory texts on larger screens.

plurals
  1. POUser-dependent file content
    text
    copied!<p>For some unfortunate reasons, I have to convert a proprietary and binary library from a one-user per workstation to a multi-user per workstation setup.</p> <p><strong>Current setup</strong>. A user uses a program linked against a library. This library reads a system wide configuration file (using an hard-coded path, ie /usr/local/thelib/main.conf ) which itself contains several paths to several working directories. The wdir are themselves containing a bunch of user data files.</p> <p><strong>Desired outcome</strong>. Being able to manage several users on the same workstation. Of course, a user shall not be able to read nor alter any other user's data through the library, which should be taken care of by unix rights if I manage to feed the library a different working directory for each user.</p> <p>The library might be used by several users at the same time so ln-ing the configuration file in /usr/local at runtime is not an option.</p> <p>I was thinking of using FUSE in order to provide a different content for the file /usr/local/thelib/main.conf, depending on an environnement variable or the current unix user. The environnement var would then be used as a switch inside the code producing the configuration file.</p> <p>I'm confortable using Python, Perl or C.</p> <p>The workstation is running an up-to-date GNU/Linux Debian or Ubuntu distribution with a pretty recent kernel.</p> <p>So. What do you think :</p> <ul> <li>would you use FUSE ?</li> <li>would you produce another kind of wrapper - using chroot(2) was suggested below per janneb - ?</li> <li>use something else allowed by Linux ?</li> </ul> <p>I kinda know that I would be able to produce something functional but I'll get the community advice since I don't want to reinvent the wheel right now.</p> <p>Thanks. Florian</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload