Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8628015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:25:40+00:00 2026-06-12T08:25:40+00:00

Let’s assume that we’ve several non-identical versions of the same folder in different locations

  • 0

Let’s assume that we’ve several non-identical versions of the same folder in different locations as follows:

  • /in/some/location/version1
  • /different/path/version2
  • /third/place/version3

Each version of them contains callerFile, which is a pre-compiled executable that we can’t control its working functionality. this callerFile will create and edit a folder called cache

  • /some/fourth/destination/cache

So we’ve contradiction between the setting of every version so what I want to do is converting the /some/fourth/destination/cache to a link with 3 different destinations

  • /some/fourth/destination/cache –> /in/some/location/version1/cache
  • /some/fourth/destination/cache –> /different/path/version2/cache
  • /some/fourth/destination/cache –> /third/place/version3/cache

so for example:

  • if /in/some/location/version1/callerFile calls /some/fourth/destination/cache it should redirected to /in/some/location/version1/cache
  • and if /different/path/version2/callerFile calls /some/fourth/destination/cache it should redirected to /different/path/version2/cache
  • and if /third/place/version3/callerFile calls /some/fourth/destination/cache it should redirected to /third/place/version3/cache

So, How can I do so on Ubuntu 12.04 64 bit Operating System?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:25:41+00:00Added an answer on June 12, 2026 at 8:25 am

    Assuming you have no control over what callerFile actually does, I mean it does what it wants and always the same, so the conclusion is you need to modify it’s environment. This will be quite advanced trick, requiring deep experience of Linux kernel and Unix programming in general, and you should think over if it’s worth. It will also require root priviledges on the machine where your callerFile binary exists.

    Solution I’d propose would be creating an executable ( or some script calling one of exec() family function ), which will prepare special environment ( or make sure it’s ready to use ), based on “mount -o bind” or unshare() system call.

    Like said, playing with so called “execution context”, is quite advanced trick. Theoretically you could also try some autofs-like solution, however you’ll probably end up with the same, and bindmount/unshare will be probably more effective than some FS-detection daemon. I wouldn’t recommend diving into FUSE, for the same reason. And playing with some over-complicated game with symlinks is probably not the way too.

    http://www.kernel.org/doc/Documentation/unshare.txt

    Note: whatever “callerFile” binary does, I’m pretty sure it won’t check its own filename, which makes possible replacing it with something else in-between, which will do exec() on “callerFileRenamed”.

    As I understand it, basically what you want is to get different result with the same activity, distinguished by some condition external to activity itself, like, for example, returning different list for “ls” in same directory, based upon e.g. UID of user who issued “ls” command, without modifying some ./ls program binary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's assume that a user votes for some movies in a scale of 1
Let's say I have some text as follows: do this, do that, then this,
Let's say that I have a date in R and it's formatted as follows.
Let assume we have two activities. A - main activity, that is home launcher
Let's assume that we are building a high traffic site that will be used
Let me explain best with an example. Say you have node class that can
Let's say that I have a SQLite database that I create in a separate
Let's say I have multiple requirements for a password. The first is that the
Let's suppose that we have multi-site CMS and every website in this CMS having
Let's say I have a main folder in my website named test which contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.