Sunday, April 1, 2018

FW: New 7.2.1 install on linux; "permission denied" on exec?

-----Original Message-----
From: hal469@xsmail.com [mailto:hal469@xsmail.com]
Sent: 29 March 2018 03:46
To: solr-user@lucene.apache.org
Subject: New 7.2.1 install on linux; "permission denied" on exec?

I'm attempting to install Solr 7.2.1 on linux.

Following instructions at


https://lucene.apache.org/solr/guide/7_2/taking-solr-to-production.html#taki
ng-solr-to-production


I install

cd /home/test/
wget http://apache.osuosl.org/lucene/solr/7.2.1/solr-7.2.1.tgz
tar zxvf ./solr-7.2.1.tgz

id solr; grep solr /etc/passwd
uid=485(solr) gid=482(solr) groups=482(solr),100(users)
solr:x:485:482::/var/solr:/bin/sh

cd /home/test/solr-7.2.1

./bin/install_solr_service.sh \
/home/test/solr-7.2.1.tgz \
-n \
-i /opt/solr \
-d /var/solr \
-s solr \
-u solr \
-p 8888

chown -R solr:solr /opt/solr

cat /etc/default/solr.in.sh | egrep -v "^$|^#"
SOLR_PID_DIR="/var/solr"
SOLR_HOME="/var/solr/data"
LOG4J_PROPS="/var/solr/log4j.properties"
SOLR_LOGS_DIR="/var/solr/logs"
SOLR_PORT="8888"

On exec, it fails to start due to permissions

systemctl daemon-reload
systemctl start solr
Job for solr.service failed because the control process
exited with error code. See "systemctl status solr.service" and "journalctl
-xe" for details.

systemctl status solr.service -l
● solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr; bad; vendor preset:
disabled)
Active: failed (Result: exit-code) since Wed 2018-03-28
14:42:21 PDT; 18s ago
Docs: man:systemd-sysv-generator(8)
Process: 7458 ExecStart=/etc/init.d/solr start
(code=exited, status=126)

Mar 28 14:42:20 test.loc su[7460]: (to solr) root on none
Mar 28 14:42:20 test.loc su[7460]: pam_unix(su-l:session):
session opened for user solr by (uid=0)
Mar 28 14:42:21 test.loc solr[7458]: -sh:
/opt/solr/solr/bin/solr: Permission denied

journalctl -f
Mar 28 14:43:23 test.loc su[7658]: (to solr) root on none
Mar 28 14:43:23 test.loc su[7658]: pam_unix(su-l:session):
session opened for user solr by (uid=0)
Mar 28 14:43:23 test.loc systemd[7659]:
pam_unix(systemd-user:session): session opened for user solr by (uid=0)
Mar 28 14:43:23 test.loc systemd[7659]: Startup finished in
100ms.
Mar 28 14:43:23 test.loc solr[7656]: -sh:
/opt/solr/solr/bin/solr: Permission denied
Mar 28 14:43:23 test.loc su[7658]: pam_unix(su-l:session):
session closed for user solr
Mar 28 14:43:23 test.loc systemd[1]: solr.service: Control
process exited, code=exited status=126
Mar 28 14:43:23 test.loc systemd[1]: Failed to start LSB:
Controls Apache Solr as a Service.
Mar 28 14:43:23 test.loc systemd[1]: solr.service: Unit
entered failed state.
Mar 28 14:43:23 test.loc systemd[1]: solr.service: Failed
with result 'exit-code'.
Mar 28 14:43:23 test.loc systemd[7659]: Received SIGRTMIN+24
from PID 7701 (kill).
Mar 28 14:43:23 test.loc systemd[7660]:
pam_unix(systemd-user:session): session closed for user solr

But the executable perm is

ls -al /opt/solr/solr/bin/solr
-rwxr-xr-x 1 solr solr 75K Jan 9 13:32
/opt/solr/solr/bin/solr*

Why's "permission denied", and what's specifically to be done to fix the
launch/exec?

No comments:

Post a Comment