Skip to content

Commit

Permalink
Merge pull request #356 from cgzones/permission_fix
Browse files Browse the repository at this point in the history
Permission fix
  • Loading branch information
jrossi committed Oct 8, 2014
2 parents e4d768a + ab514a9 commit 7514a29
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ install: install-${TARGET}
install-agent: install-common
install -m 0550 -o root -g 0 ossec-agentd ${PREFIX}/bin
install -m 0550 -o root -g 0 agent-auth ${PREFIX}/bin

install -d -m 0750 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/queue/rids

install -d -m 0770 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/tmp

Expand All @@ -303,10 +305,9 @@ install-common: build
install -m 0550 -o root -g 0 ${OSSEC_CONTROL_SRC} ${PREFIX}/bin/ossec-control

install -d -m 0550 -o root -g ${OSSEC_GROUP} ${PREFIX}/queue
install -d -m 0750 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/queue/alerts
install -d -m 0770 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/queue/alerts
install -d -m 0750 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/queue/ossec
install -d -m 0750 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/queue/syscheck
install -d -m 0750 -o ${OSSEC_USER_REM} -g ${OSSEC_GROUP} ${PREFIX}/queue/rids
install -d -m 0750 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/queue/diff

install -d -m 0550 -o root -g ${OSSEC_GROUP} ${PREFIX}/etc
Expand All @@ -332,7 +333,7 @@ else
endif
endif

install -d -m 0550 -o root -g ${OSSEC_GROUP} ${PREFIX}/etc/shared
install -d -m 0770 -o root -g ${OSSEC_GROUP} ${PREFIX}/etc/shared
install -m 0440 -o root -g ${OSSEC_GROUP} rootcheck/db/*.txt ${PREFIX}/etc/shared/

install -d -m 0550 -o root -g ${OSSEC_GROUP} ${PREFIX}/active-response
Expand All @@ -344,6 +345,9 @@ endif

install -m 0550 -o root -g ${OSSEC_GROUP} ../active-response/*.sh ${PREFIX}/active-response/bin/
install -m 0550 -o root -g ${OSSEC_GROUP} ../active-response/firewalls/*.sh ${PREFIX}/active-response/bin/

install -d -m 0550 -o root -g ${OSSEC_GROUP} ${PREFIX}/var
install -d -m 0770 -o root -g ${OSSEC_GROUP} ${PREFIX}/var/run

./init/fw-check.sh execute

Expand Down Expand Up @@ -392,10 +396,10 @@ endif

install -d -m 0750 -o ${OSSEC_USER_REM} -g ${OSSEC_GROUP} ${PREFIX}/queue/agent-info
install -d -m 0750 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/queue/agentless

install -d -m 0750 -o ${OSSEC_USER_REM} -g ${OSSEC_GROUP} ${PREFIX}/queue/rids

install -d -m 0750 -o root -g ${OSSEC_GROUP} ${PREFIX}/tmp
install -d -m 0550 -o root -g ${OSSEC_GROUP} ${PREFIX}/var
install -d -m 0770 -o root -g ${OSSEC_GROUP} ${PREFIX}/var/run

install -m 0640 -o root -g ${OSSEC_GROUP} ../etc/decoder.xml ${PREFIX}/etc/
install -m 0640 -o root -g ${OSSEC_GROUP} /dev/null ${PREFIX}/etc/local_decoder.xml
Expand Down

0 comments on commit 7514a29

Please sign in to comment.