lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan...@apache.org
Subject lucene-solr:master: SOLR-10644: Make solr.in.sh owned by root, readable to solr (group) but not world-readable
Date Mon, 15 May 2017 14:06:08 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 08711cf4f -> 50a080426


SOLR-10644: Make solr.in.sh owned by root, readable to solr (group) but not world-readable


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/50a08042
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/50a08042
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/50a08042

Branch: refs/heads/master
Commit: 50a08042630c28fb2b85a05440dae170a46cbf49
Parents: 08711cf
Author: Jan Høydahl <janhoy@apache.org>
Authored: Mon May 15 16:05:32 2017 +0200
Committer: Jan Høydahl <janhoy@apache.org>
Committed: Mon May 15 16:06:01 2017 +0200

----------------------------------------------------------------------
 solr/bin/install_solr_service.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/50a08042/solr/bin/install_solr_service.sh
----------------------------------------------------------------------
diff --git a/solr/bin/install_solr_service.sh b/solr/bin/install_solr_service.sh
index 54b62e5..b829571 100755
--- a/solr/bin/install_solr_service.sh
+++ b/solr/bin/install_solr_service.sh
@@ -251,9 +251,9 @@ solr_uid="`id -u "$SOLR_USER"`"
 if [ $? -ne 0 ]; then
   echo "Creating new user: $SOLR_USER"
   if [ "$distro" == "RedHat" ] || [ "$distro" == "CentOS" ] ; then
-    adduser "$SOLR_USER"
+    adduser --system -U -m --home-dir "$SOLR_VAR_DIR" "$SOLR_USER"
   elif [ "$distro" == "SUSE" ]; then
-    useradd -m "$SOLR_USER"
+    useradd --system -U -m --home-dir "$SOLR_VAR_DIR" "$SOLR_USER"
   else
     adduser --system --shell /bin/bash --group --disabled-password --home "$SOLR_VAR_DIR"
"$SOLR_USER"
   fi
@@ -331,8 +331,8 @@ SOLR_LOGS_DIR=\"$SOLR_VAR_DIR/logs\"
 SOLR_PORT=\"$SOLR_PORT\"
 " >> "/etc/default/$SOLR_SERVICE.in.sh"
 fi
-chown ${SOLR_USER}: "/etc/default/$SOLR_SERVICE.in.sh"
-chmod 0660 "/etc/default/$SOLR_SERVICE.in.sh"
+chown root:${SOLR_USER} "/etc/default/$SOLR_SERVICE.in.sh"
+chmod 0640 "/etc/default/$SOLR_SERVICE.in.sh"
 
 # install data directories and files
 mkdir -p "$SOLR_VAR_DIR/data"


Mime
View raw message