docintelapp / DocIntel

Open Source Platform for storing, organizing, and searching documents related to cyber threats
https://docintel.org
Other
154 stars 24 forks source link

run.sh fails with "operation not permitted" error from chown #96

Open massdosage opened 10 months ago

massdosage commented 10 months ago

The run.sh script uses chown to assign ownership to 8983:8983 which fails on any machine that doesn't have a user or group with that id:

:books: Configuring SolR
chown: ~/data/solr: Operation not permitted
massdosage commented 10 months ago

I also did something similar for the postgres folder otherwise it gets created with the following ownership which prevents the current user from deleting it later:

drwx------. 19 systemd-coredump root 4.0K Nov  8 09:58 postgres
massdosage commented 10 months ago

I then ran into this problem with starting the solr docker container:

docker run --name docintel-dev-solr \
    -v ./data/solr/:/var/solr \
     solr
Cannot write to /var/solr as 8983:8983

which I fixed by removing /var/solr from the volume mount arguments as this won't be present on machines that don't have solr installed on them.

massdosage commented 10 months ago

I then ran into this issue where the curl commands are trying to output files to non-existent directories:

Warning: /home/some-user/docintel/data/solr/data/document/conf/solrconfig.xml: No
Warning: such file or directory
  2 49925    2  1369    0     0   8450      0  0:00:05 --:--:--  0:00:05  8450
curl: (23) Failure writing output to destination

These directories need to be created first (at least on CentOS).

massdosage commented 10 months ago

With all of these changes I can successfully run the run.sh to completion on Linux.