Make a soft link ONLY resolvable as softlink

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0














We have a 3rd party backup tool that is resolving a soft link (ORACLE_HOME) to the full physical path. It then can't find the DB as it's value of ORACLE_HOME doesn't match SAP/Oracle's version.



I.e. we have a symbolic link /oracle/SAP/122 which actually points at /oracle/SAP/12201. SAP and Oracle believe that ORACLE_HOME is /oracle/SAP/122 but the 3rd party tool picks up a value of /oracle/SAP/12201.



The way SAP works with these symbolic links mean we can't change anything from that side.



Just wondering if there's a way to 'make' the 3rd party tool only pick up the symbolic link - we can't alter the internals of the tool, is there anything we can do with the link itself or a setting in the OS? I know there are shell settings you can adjust so pwd and other commands read it as physical or symbolic but I don't know how this 3rd party tool works. Would it make any difference if we made it a hard link perhaps?



Thanks
Ross










share|improve this question

















  • 1




    Is the target of the link a directory? If so you can not make it a hard link, as hard links are only available for files.
    – Jaleks
    Dec 20 '18 at 10:39










  • Yes it is a directory - good point!
    – Ross Armstrong
    Dec 20 '18 at 10:40










  • are you on linux? then you may use bind mounts instead of symlinks: mount -B /oracle/SAP/12201 /oracle/SAP/122 (it works even with regular files, not just directories).
    – mosvy
    Dec 20 '18 at 10:57






  • 1




    Yes RHEL - that's an interesting idea and in theory should work. I believe some 'side effects' of using bind mounts though is that backups/copies/file searches etc will find both copies which could potentially cause some issues
    – Ross Armstrong
    Dec 20 '18 at 11:17










  • Well everything is bound to have "side-effects" if it has any effect at all. The safest thing you could do is to modify that 3rd party tool (either recompile or do a hard-hack, ie modify the binary directly). Firefox has the same problem with symlinks when handling the file:/// protocol, and there is a LD_PRELOAD hack floating around -- you probably could use something similar; FWIW, include the output of strace -fe trace=file -o str-out your_binary; grep SAP/122 str-out in your question.
    – mosvy
    Dec 21 '18 at 4:06
















0














We have a 3rd party backup tool that is resolving a soft link (ORACLE_HOME) to the full physical path. It then can't find the DB as it's value of ORACLE_HOME doesn't match SAP/Oracle's version.



I.e. we have a symbolic link /oracle/SAP/122 which actually points at /oracle/SAP/12201. SAP and Oracle believe that ORACLE_HOME is /oracle/SAP/122 but the 3rd party tool picks up a value of /oracle/SAP/12201.



The way SAP works with these symbolic links mean we can't change anything from that side.



Just wondering if there's a way to 'make' the 3rd party tool only pick up the symbolic link - we can't alter the internals of the tool, is there anything we can do with the link itself or a setting in the OS? I know there are shell settings you can adjust so pwd and other commands read it as physical or symbolic but I don't know how this 3rd party tool works. Would it make any difference if we made it a hard link perhaps?



Thanks
Ross










share|improve this question

















  • 1




    Is the target of the link a directory? If so you can not make it a hard link, as hard links are only available for files.
    – Jaleks
    Dec 20 '18 at 10:39










  • Yes it is a directory - good point!
    – Ross Armstrong
    Dec 20 '18 at 10:40










  • are you on linux? then you may use bind mounts instead of symlinks: mount -B /oracle/SAP/12201 /oracle/SAP/122 (it works even with regular files, not just directories).
    – mosvy
    Dec 20 '18 at 10:57






  • 1




    Yes RHEL - that's an interesting idea and in theory should work. I believe some 'side effects' of using bind mounts though is that backups/copies/file searches etc will find both copies which could potentially cause some issues
    – Ross Armstrong
    Dec 20 '18 at 11:17










  • Well everything is bound to have "side-effects" if it has any effect at all. The safest thing you could do is to modify that 3rd party tool (either recompile or do a hard-hack, ie modify the binary directly). Firefox has the same problem with symlinks when handling the file:/// protocol, and there is a LD_PRELOAD hack floating around -- you probably could use something similar; FWIW, include the output of strace -fe trace=file -o str-out your_binary; grep SAP/122 str-out in your question.
    – mosvy
    Dec 21 '18 at 4:06














0












0








0







We have a 3rd party backup tool that is resolving a soft link (ORACLE_HOME) to the full physical path. It then can't find the DB as it's value of ORACLE_HOME doesn't match SAP/Oracle's version.



I.e. we have a symbolic link /oracle/SAP/122 which actually points at /oracle/SAP/12201. SAP and Oracle believe that ORACLE_HOME is /oracle/SAP/122 but the 3rd party tool picks up a value of /oracle/SAP/12201.



The way SAP works with these symbolic links mean we can't change anything from that side.



Just wondering if there's a way to 'make' the 3rd party tool only pick up the symbolic link - we can't alter the internals of the tool, is there anything we can do with the link itself or a setting in the OS? I know there are shell settings you can adjust so pwd and other commands read it as physical or symbolic but I don't know how this 3rd party tool works. Would it make any difference if we made it a hard link perhaps?



Thanks
Ross










share|improve this question













We have a 3rd party backup tool that is resolving a soft link (ORACLE_HOME) to the full physical path. It then can't find the DB as it's value of ORACLE_HOME doesn't match SAP/Oracle's version.



I.e. we have a symbolic link /oracle/SAP/122 which actually points at /oracle/SAP/12201. SAP and Oracle believe that ORACLE_HOME is /oracle/SAP/122 but the 3rd party tool picks up a value of /oracle/SAP/12201.



The way SAP works with these symbolic links mean we can't change anything from that side.



Just wondering if there's a way to 'make' the 3rd party tool only pick up the symbolic link - we can't alter the internals of the tool, is there anything we can do with the link itself or a setting in the OS? I know there are shell settings you can adjust so pwd and other commands read it as physical or symbolic but I don't know how this 3rd party tool works. Would it make any difference if we made it a hard link perhaps?



Thanks
Ross







symlink






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 20 '18 at 10:31









Ross Armstrong

1




1







  • 1




    Is the target of the link a directory? If so you can not make it a hard link, as hard links are only available for files.
    – Jaleks
    Dec 20 '18 at 10:39










  • Yes it is a directory - good point!
    – Ross Armstrong
    Dec 20 '18 at 10:40










  • are you on linux? then you may use bind mounts instead of symlinks: mount -B /oracle/SAP/12201 /oracle/SAP/122 (it works even with regular files, not just directories).
    – mosvy
    Dec 20 '18 at 10:57






  • 1




    Yes RHEL - that's an interesting idea and in theory should work. I believe some 'side effects' of using bind mounts though is that backups/copies/file searches etc will find both copies which could potentially cause some issues
    – Ross Armstrong
    Dec 20 '18 at 11:17










  • Well everything is bound to have "side-effects" if it has any effect at all. The safest thing you could do is to modify that 3rd party tool (either recompile or do a hard-hack, ie modify the binary directly). Firefox has the same problem with symlinks when handling the file:/// protocol, and there is a LD_PRELOAD hack floating around -- you probably could use something similar; FWIW, include the output of strace -fe trace=file -o str-out your_binary; grep SAP/122 str-out in your question.
    – mosvy
    Dec 21 '18 at 4:06













  • 1




    Is the target of the link a directory? If so you can not make it a hard link, as hard links are only available for files.
    – Jaleks
    Dec 20 '18 at 10:39










  • Yes it is a directory - good point!
    – Ross Armstrong
    Dec 20 '18 at 10:40










  • are you on linux? then you may use bind mounts instead of symlinks: mount -B /oracle/SAP/12201 /oracle/SAP/122 (it works even with regular files, not just directories).
    – mosvy
    Dec 20 '18 at 10:57






  • 1




    Yes RHEL - that's an interesting idea and in theory should work. I believe some 'side effects' of using bind mounts though is that backups/copies/file searches etc will find both copies which could potentially cause some issues
    – Ross Armstrong
    Dec 20 '18 at 11:17










  • Well everything is bound to have "side-effects" if it has any effect at all. The safest thing you could do is to modify that 3rd party tool (either recompile or do a hard-hack, ie modify the binary directly). Firefox has the same problem with symlinks when handling the file:/// protocol, and there is a LD_PRELOAD hack floating around -- you probably could use something similar; FWIW, include the output of strace -fe trace=file -o str-out your_binary; grep SAP/122 str-out in your question.
    – mosvy
    Dec 21 '18 at 4:06








1




1




Is the target of the link a directory? If so you can not make it a hard link, as hard links are only available for files.
– Jaleks
Dec 20 '18 at 10:39




Is the target of the link a directory? If so you can not make it a hard link, as hard links are only available for files.
– Jaleks
Dec 20 '18 at 10:39












Yes it is a directory - good point!
– Ross Armstrong
Dec 20 '18 at 10:40




Yes it is a directory - good point!
– Ross Armstrong
Dec 20 '18 at 10:40












are you on linux? then you may use bind mounts instead of symlinks: mount -B /oracle/SAP/12201 /oracle/SAP/122 (it works even with regular files, not just directories).
– mosvy
Dec 20 '18 at 10:57




are you on linux? then you may use bind mounts instead of symlinks: mount -B /oracle/SAP/12201 /oracle/SAP/122 (it works even with regular files, not just directories).
– mosvy
Dec 20 '18 at 10:57




1




1




Yes RHEL - that's an interesting idea and in theory should work. I believe some 'side effects' of using bind mounts though is that backups/copies/file searches etc will find both copies which could potentially cause some issues
– Ross Armstrong
Dec 20 '18 at 11:17




Yes RHEL - that's an interesting idea and in theory should work. I believe some 'side effects' of using bind mounts though is that backups/copies/file searches etc will find both copies which could potentially cause some issues
– Ross Armstrong
Dec 20 '18 at 11:17












Well everything is bound to have "side-effects" if it has any effect at all. The safest thing you could do is to modify that 3rd party tool (either recompile or do a hard-hack, ie modify the binary directly). Firefox has the same problem with symlinks when handling the file:/// protocol, and there is a LD_PRELOAD hack floating around -- you probably could use something similar; FWIW, include the output of strace -fe trace=file -o str-out your_binary; grep SAP/122 str-out in your question.
– mosvy
Dec 21 '18 at 4:06





Well everything is bound to have "side-effects" if it has any effect at all. The safest thing you could do is to modify that 3rd party tool (either recompile or do a hard-hack, ie modify the binary directly). Firefox has the same problem with symlinks when handling the file:/// protocol, and there is a LD_PRELOAD hack floating around -- you probably could use something similar; FWIW, include the output of strace -fe trace=file -o str-out your_binary; grep SAP/122 str-out in your question.
– mosvy
Dec 21 '18 at 4:06
















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490100%2fmake-a-soft-link-only-resolvable-as-softlink%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490100%2fmake-a-soft-link-only-resolvable-as-softlink%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?