Hi there,
I have a web application which calls OMERO CLI to import/export data from/to OMERO. This works Ok as long as the web server user is not apache (www-data), but does not work when www-data is the web server user and therefore also the user executing OMERO CLI. Presumably this happens because www-data cannot write to its own home /var/www which is usually owned by root.
In theory that problem can be fixed by using OMERO CLI's --session-dir option
$path/bin/omero login -u <user> -w <password> --session-dir=/tmp
which successfully logs the user on to OMERO and returns the session key.
The problem comes when executing HQL commands, to which I can pass the session key, as follows:
$path/bin/omero hql -q --limit -1 "SELECT i.id FROM Experimenter i WHERE i.omeName='<user>'" -k <key> -u <user> -w <password>
which returns: Could not access session dir: /var/www/omero
It seems that the HQL command tries to find the session key in the default user home /var/www
I thought of passing the session-dir to the HQL command as well, but this is not supported.
Could somebody explain if I've missed something or how to overcome this issue?
Thanks a lot in advance,
Daniel