fix: [installer] Fixed installer misp-modules permissions.

pull/4558/head
Steve Clement 2019-05-01 22:56:55 +09:00
parent 58999e2b72
commit a79ef14d04
5 changed files with 14 additions and 7 deletions

View File

@ -128,7 +128,7 @@ MISPvars () {
CAKE="$PATH_TO_MISP/app/Console/cake"
# sudo config to run $LUSER commands
if [[ "$(groups |grep -o 'staff')" == "staff" ]]; then
if [[ "$(groups ${MISP_USER} |grep -o 'staff')" == "staff" ]]; then
SUDO_USER="sudo -H -u ${MISP_USER} -g staff"
else
SUDO_USER="sudo -H -u ${MISP_USER}"
@ -352,6 +352,15 @@ checkID () {
sudo adduser $MISP_USER staff
sudo adduser $MISP_USER $WWW_USER
fi
# FIXME: the below SUDO_USER check is a duplicate from global variables, try to have just one check
# sudo config to run $LUSER commands
if [[ "$(groups ${MISP_USER} |grep -o 'staff')" == "staff" ]]; then
SUDO_USER="sudo -H -u ${MISP_USER} -g staff"
else
SUDO_USER="sudo -H -u ${MISP_USER}"
fi
}
# pre-install check to make sure what we will be installing on, is ready and not a half installed system
@ -1345,8 +1354,6 @@ backgroundWorkers () {
# Main MISP Modules install function
mispmodules () {
# FIXME: this is broken, ${PATH_TO_MISP} is litteral
##sudo sed -i -e '$i \sudo -u www-data /var/www/MISP/venv/bin/misp-modules -l 127.0.0.1 -s > /tmp/misp-modules_rc.local.log &\n' /etc/rc.local
cd /usr/local/src/
## TODO: checkUsrLocalSrc in main doc
debug "Cloning misp-modules"

View File

@ -1 +1 @@
81a19d45ae7f499cfe34e35e2c3af93af58ecc9f INSTALL.sh
eaf31965e51c8fc7a6202d7896aa0e9b0b3ecb3d INSTALL.sh

View File

@ -1 +1 @@
cb9ab4292ed6dac59884e4cf51f4a83a5525e499dfbc76a637f1d49811382280 INSTALL.sh
4544798f992578aaffa28ba816591ba2dbf38c18824c4df0a901f13dd7ded714 INSTALL.sh

View File

@ -1 +1 @@
0a807abd32d6d8f894d1466a0854b449c1bc53fde9b0fbb43582d007f48749c103c4b607f385a75c548a3422b5a9fd57 INSTALL.sh
2930fa3ddeccc2753ad91ef4869dc43357093d24c33b8e01fa5c3218922ecf3855b7cb05bb5a60da1d4f9050ad1bbeef INSTALL.sh

View File

@ -1 +1 @@
4fa55166257b1438e503323d28ffc35cab19a7503709bac699393870ff2225899204f7263b583512e15e9214b912457ab52ab9281a957720c611bbdbc3b58815 INSTALL.sh
54ba106074b191d85102b86da534a7ea5327ac208d6f3551b262b6daee6e8a289f3fe97b323a7ada4242b0a5580d8600f5caf8d2e4244b07a57a54f54cd8f426 INSTALL.sh