Closed danielburrell closed 6 years ago
Hello. Try checking permissions on /var/opengrok/
and below w.r.t. the web server account. E.g., I allow my server account to read /var/opengrok/
and below and to write /var/opengrok/data
(no subdirs) for statistics.json
.
Those first two commands you mention — OpenGrok deploy
and OpenGrok index
— are run as an account different from the web container. The UI gets its project list from /var/opengrok/etc/configuration.xml
written by OpenGrok index
(the UI also receives the contents of that XML file via messaging during indexing).
To make things funnier, after the indexing process it even lists the projects available in the dropdown, presumably it must have only known of these projects after accessing the directory.
Like @idodeclare mentioned, this is not true for all cases as the UI receives partial updates of configuration during the indexer run and has a copy of the configuration stored in memory.
For completeness, I have abandoned trying to install it directly on centos, and instead opted to modify a docker image with a shared volume. Seems to work fine. An attempt to adjust permissions was made but it made no difference. No attempt to modify permissions was made with the docker image and it worked fine.
OS: CentOS Linux 7 (3.10.0-693.el7.x86_64) Tomcat 8 Java 8
Running with or without security manager.
In the case of running with I added these lines to the catalina.policy. But this doesn't matter because I ran it without a security manager too.
Produces the error below. Yet the directory exists and is populated with source code. To make things funnier, after the indexing process it even lists the projects available in the dropdown, presumably it must have only known of these projects after accessing the directory.