Make a soft link ONLY resolvable as softlink
Clash Royale CLAN TAG#URR8PPP
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
add a comment |
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
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 aLD_PRELOAD
hack floating around -- you probably could use something similar; FWIW, include the output ofstrace -fe trace=file -o str-out your_binary; grep SAP/122 str-out
in your question.
– mosvy
Dec 21 '18 at 4:06
add a comment |
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
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
symlink
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 aLD_PRELOAD
hack floating around -- you probably could use something similar; FWIW, include the output ofstrace -fe trace=file -o str-out your_binary; grep SAP/122 str-out
in your question.
– mosvy
Dec 21 '18 at 4:06
add a comment |
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 aLD_PRELOAD
hack floating around -- you probably could use something similar; FWIW, include the output ofstrace -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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 ofstrace -fe trace=file -o str-out your_binary; grep SAP/122 str-out
in your question.– mosvy
Dec 21 '18 at 4:06