locally from custom pwd not able to acces config-file


I find this a bit weird:

In my project I download the tar.gz of release 3.1.10 and make an RPM-package of it.

The complete RPM-instalation sets custom db-path to /var/lib/orientdb/data and log path to /var/log/orientdb/
The rest of orientdb is put in /opt/orientdb/orientdb-3.1.10

in the .bashrc file I have created $ORIENTDB_HOME="/opt/orientdb/orientdb-3.1.10" ORIENTDB_BIN="$ORIENTDB_HOME/bin" ORIENTDB_CONFIG="$ORIENTDB_HOME/config"


The server is up and running with systemd.
On https port 2480 and binary ssl port 2434

So far so good and here comes the funny part

If I stand at home dir /opt/orientdb/ and want to access /opt/orientdb/orientdb-3.1.10/bin/ I can do it since it’s in my path:

    $ pwd

    OrientDB console v.3.1.10 - Veloce (build 8921c4c075030f2c351cca85a3047aaed44f464c, branch 3.1.x)
    Type 'help' to display all the supported commands.
    orientdb> pwd

    Current path: /opt/orientdb
    orientdb> connect remote:localhost:2434 root
    Enter password:
    orientdb {server=remote:localhost:2434}> set server user u123456 YmvgdOty6+6T1k/IRBEy0flFSi11H+Oe *

    Error: com.orientechnologies.orient.core.exception.OConfigurationException: Cannot access to file ../config/orientdb-server-config.xml

    orientdb {server=remote:localhost:2434}> exit

Now if I want to add server user it won’t let me since it tries to go up one level and then find config/orientdb-server-config.xml file which it of course wont since my pwd is /opt/orientdb

If I go to $ORIENTDB_HOME/bin of course it works perfectly but I would want to be the “orientdb” user and invoke the “” wherever from.

I have also found that if I edit the $ORIENTDB_HOME/bin/ file I can sneak in the “cd $ORIENTDB_HOME/bin” under “export $ORIENTDB_HOME” and then upon invoking the sub-process is using /opt/orientdb/orientdb-3.1.10/bin and when I exit i am still in /opt/orientdb.