Paul Coviello · Sep 20

Linux and links

If I create a link does root use it? (it’s in profile.d dir)

I'm trying to use a shortcut for a filepath as such: anyone have any thoughts?

PROCAUTO  = /JRNDSK/ProcAuto_share

yet in the application it isn't recognizing it.

Here’s the scenario. (link is in place) that my manager thinks maybe an issue.

login as cacheusr

sudo to root

Then start cache. Since this was started as root through cacheusr would cache know about the link? (since it’s running as root)

Product version: Caché 2015.1
$ZV: 2015.2.3 (Build 855_0_16694)
0 76
Discussion (3)1
Log in or sign up to continue

Hi Paul! Nice to see you on the DC.  These questions are hard because there's a lot of"plumbing" to think about.

If I understand things right, you have an environment variable for root set via a script file in /etc/profile.d and that's working at the Linux shell.  But you don't see that at a Cache' terminal even when you start the instance as root.

Caché daemons will run as the instance owner and user jobs would run with the privilege and environment of the user who logs in.  Otherwise, an ordinary user could open a Caché terminal and work with root privilege.  I'm writing this from memory, and Caché 2015.1 is pretty old now, so there might be some other details that are relevant (and which I'm forgetting).

Another issue is that when you use the sudo or su commands to "become root", you don't necessarily get root's environment unless you use the right options for that.  The manpages for sudo and su should help you figure out this.

If you can tell us some more about what you are trying to accomplish with the link, we might be able to help further.  If you are trying to establish links to files that are established when the instance starts and persist, what you need might better be addressed with actions in SYSTEM^%ZSTART or ^ZSTU.  For that, the WRC might also be able to help.

Good luck.  I hope this at least gives you a trailhead to solve the trouble.

Hi Erik,  yes for the most part you have it correct, though we have a link. (the variable wasn't what I wanted) in a nutshell I'm trying to pass the link to the application to write out a report or file. vs the whole file path.  and just to clarify we have been running on VMS for years which allows for logicals and symbols which we then can use for a shortcut. 

I'm still looking to see how to pass a shortcut in, and an export doesn't work either with or without the $ symbol.  and I thought hard links may have been an option but they are not allowed. sigh! 

anyone have any further thoughts ?


Paul ( who is thinking maybe a windows platform may be an option)