diff options
author | Mikhail Kolesnik <mike@openbunker.org> | 2008-03-20 14:51:38 +0200 |
---|---|---|
committer | Mikhail Kolesnik <mike@openbunker.org> | 2008-03-20 14:51:38 +0200 |
commit | f309bce27b3401cf3c991708a6eaafff3c0bebd2 (patch) | |
tree | d6b10a9e3c02a4943c65e0cfa74520f0f265f55a | |
parent | a40c550ab5612030f44a1e3b19296edcae833841 (diff) | |
download | contrib-f309bce27b3401cf3c991708a6eaafff3c0bebd2.tar.gz contrib-f309bce27b3401cf3c991708a6eaafff3c0bebd2.tar.xz |
zabbix_{server,agentd,utils}: fixed permissions for log rotation issue
-rw-r--r-- | zabbix_agentd/Pkgfile | 2 | ||||
-rwxr-xr-x | zabbix_agentd/post-install | 5 | ||||
-rw-r--r-- | zabbix_server/.footprint | 4 | ||||
-rw-r--r-- | zabbix_server/Pkgfile | 5 | ||||
-rwxr-xr-x | zabbix_server/post-install | 1 | ||||
-rw-r--r-- | zabbix_utils/Pkgfile | 2 | ||||
-rwxr-xr-x | zabbix_utils/post-install | 5 |
7 files changed, 16 insertions, 8 deletions
diff --git a/zabbix_agentd/Pkgfile b/zabbix_agentd/Pkgfile index 91c729521..6a050fe4c 100644 --- a/zabbix_agentd/Pkgfile +++ b/zabbix_agentd/Pkgfile @@ -5,7 +5,7 @@ name=zabbix_agentd version=1.4.4 -release=1 +release=2 source=(http://dl.sourceforge.net/sourceforge/zabbix/zabbix-$version.tar.gz \ zabbix_agentd.conf zabbix_agentd) diff --git a/zabbix_agentd/post-install b/zabbix_agentd/post-install index aa9fb3ee4..d12cbd3c8 100755 --- a/zabbix_agentd/post-install +++ b/zabbix_agentd/post-install @@ -11,7 +11,7 @@ ADD_UID=70 ADD_USER=zbxagent ADD_USER_HOME=/var/empty ADD_USER_SHELL=/bin/bash -ADD_GROUP=zbxagent +ADD_GROUP=zabbix ADD_STATUS=0 if [ -z `getent group | gawk -F: '{ print $1 }' | grep ^$ADD_GROUP$` ]; then @@ -40,6 +40,9 @@ if [ -z `getent passwd | gawk -F: '{ print $1 }' | grep ^$ADD_USER$` ]; then fi fi +echo "one time fix: modifying $ADD_USER primary group to $ADD_GROUP" +/usr/sbin/usermod -g $ADD_GROUP $ADD_USER + # additional chown $ADD_USER:$ADD_GROUP /var/log/zabbix/zabbix_agentd.* chown -R $ADD_USER:$ADD_GROUP /var/run/zabbix_agentd diff --git a/zabbix_server/.footprint b/zabbix_server/.footprint index ae0d89d4c..9cb0fc05a 100644 --- a/zabbix_server/.footprint +++ b/zabbix_server/.footprint @@ -8,8 +8,8 @@ drwxr-xr-x root/root usr/sbin/ -rwxr-xr-x root/root usr/sbin/zabbix_server drwxr-xr-x root/root var/ drwxr-xr-x root/root var/log/ -drwxr-xr-x root/root var/log/zabbix/ --rw------- daemon/daemon var/log/zabbix/zabbix_server.log (EMPTY) +drwxrwxr-x root/daemon var/log/zabbix/ +-rw------- root/daemon var/log/zabbix/zabbix_server.log (EMPTY) drwxr-xr-x root/root var/run/ drwx------ daemon/daemon var/run/zabbix_server/ -rw-r--r-- daemon/daemon var/run/zabbix_server/zabbix_server.pid (EMPTY) diff --git a/zabbix_server/Pkgfile b/zabbix_server/Pkgfile index bc9be1324..ab293c8ca 100644 --- a/zabbix_server/Pkgfile +++ b/zabbix_server/Pkgfile @@ -5,7 +5,7 @@ name=zabbix_server version=1.4.4 -release=1 +release=2 source=(http://dl.sourceforge.net/sourceforge/zabbix/zabbix-$version.tar.gz \ zabbix_server.conf zabbix_server) @@ -22,10 +22,11 @@ build() { make DESTDIR=$PKG install mkdir -p $PKG/{var/log/zabbix,var/run/zabbix_server} + chmod 775 $PKG/var/log/zabbix touch $PKG/var/log/zabbix/zabbix_server.log chmod 600 $PKG/var/log/zabbix/zabbix_server.log - chown -R daemon:daemon $PKG/var/log/zabbix/zabbix_server.log + chgrp -R daemon $PKG/var/log/zabbix touch $PKG/var/run/zabbix_server/zabbix_server.pid chmod 700 $PKG/var/run/zabbix_server diff --git a/zabbix_server/post-install b/zabbix_server/post-install index b50834f97..fd514bde0 100755 --- a/zabbix_server/post-install +++ b/zabbix_server/post-install @@ -41,6 +41,7 @@ if [ -z `getent passwd | gawk -F: '{ print $1 }' | grep ^$ADD_USER$` ]; then fi # additional +chgrp $ADD_GROUP /var/log/zabbix chown $ADD_USER:$ADD_GROUP /var/log/zabbix/zabbix_server.log chown -R $ADD_USER:$ADD_GROUP /var/run/zabbix_server chown $ADD_USER:$ADD_GROUP /etc/zabbix/zabbix_server.conf diff --git a/zabbix_utils/Pkgfile b/zabbix_utils/Pkgfile index 2c0a5df99..e7bc6eda3 100644 --- a/zabbix_utils/Pkgfile +++ b/zabbix_utils/Pkgfile @@ -5,7 +5,7 @@ name=zabbix_utils version=1.4.4 -release=1 +release=2 source=(http://dl.sourceforge.net/sourceforge/zabbix/zabbix-$version.tar.gz) build() { diff --git a/zabbix_utils/post-install b/zabbix_utils/post-install index 49a99843a..efcb6f2c9 100755 --- a/zabbix_utils/post-install +++ b/zabbix_utils/post-install @@ -11,7 +11,7 @@ ADD_UID=70 ADD_USER=zbxagent ADD_USER_HOME=/var/empty ADD_USER_SHELL=/bin/bash -ADD_GROUP=zbxagent +ADD_GROUP=zabbix ADD_STATUS=0 if [ -z `getent group | gawk -F: '{ print $1 }' | grep ^$ADD_GROUP$` ]; then @@ -40,4 +40,7 @@ if [ -z `getent passwd | gawk -F: '{ print $1 }' | grep ^$ADD_USER$` ]; then fi fi +echo "one time fix: modifying $ADD_USER primary group to $ADD_GROUP" +/usr/sbin/usermod -g $ADD_GROUP $ADD_USER + exit $ADD_STATUS |