DocIntel icon indicating copy to clipboard operation
DocIntel copied to clipboard

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

Open massdosage opened this issue 2 years ago • 4 comments

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 avatar Nov 08 '23 09:11 massdosage

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 avatar Nov 08 '23 10:11 massdosage

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 avatar Nov 08 '23 10:11 massdosage

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 avatar Nov 08 '23 10:11 massdosage

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

massdosage avatar Nov 08 '23 10:11 massdosage