Results 1 to 3 of 3

Thread: Zimbra running as root

  1. #1
    Join Date
    Dec 2011
    Posts
    14
    Rep Power
    3

    Default Zimbra running as root

    Hi all,

    I've been fighting with an issue for the past several weeks and I can't figure out what is happening. I've had the FOSS edition up and running now for well over 1 year without any problems... I've been running the backup script provided here. This has also been working without issue. Now all of a sudden it fails the nightly backup,... sometimes. The issue seems to be intermittent.

    So after looking through the forums I ran across a thread that suggested that zimbra
    may be running as root,... it seems that it is. I shutdown the server (sudo shutdown -h now)... power back on, it completes boot without issue. I run:
    ps -ef | grep '/opt/zimbra' | grep "java" | grep -v "zmmailboxmgr" | awk '{print $1}'
    | head -n 1

    the command returns:
    root

    I run:
    sudo su - zimbra
    zmcontrol stop
    exit
    sudo su
    /opt/zimbra/libexec/zmfixperms --extended
    exit
    sudo su - zimbra
    zmcontrol start

    all goes as expected, all up and running...
    exit

    I again run:
    ps -ef | grep '/opt/zimbra' | grep "java" | grep -v "zmmailboxmgr" | awk '{print $1}'
    | head -n 1

    the command returns:
    root


    I run:
    ps aux | grep zimbra

    the command returns:

    zimbra 3654 0.0 1.7 81100 71460 ? S 12:40 0:04 amavisd (ch6-avail)
    root 3939 0.0 0.0 3028 752 tty1 R+ 14:34 0:00 grep zimbra
    zimbra 6726 0.0 1.6 78884 69204 ? S 12:43 0:04 amavisd (ch6-avail)
    zimbra 7955 0.0 1.6 78924 69248 ? S 12:45 0:03 amavisd (ch6-avail)
    zimbra 8830 0.0 1.7 81716 72112 ? S 12:45 0:02 amavisd (ch6-avail)
    zimbra 8838 0.1 1.7 80532 70860 ? S 12:45 0:06 amavisd (ch6-avail)
    zimbra 9184 0.0 1.7 81692 71932 ? S 12:46 0:04 amavisd (ch6-avail)
    zimbra 10074 0.0 1.6 78444 68768 ? S 12:47 0:03 amavisd (ch6-avail)
    zimbra 11286 0.0 1.6 78360 68688 ? S 12:48 0:01 amavisd (ch5-avail)
    zimbra 12160 0.0 1.7 82448 72844 ? S 12:49 0:05 amavisd (ch5-avail)
    zimbra 14857 0.1 0.8 153696 33040 ? Ssl 07:52 0:39 /opt/zimbra/openldap/sbin/slapd -l LOCAL0 -4 -u zimbra -h ldap://mail.mcmgrp.net:389 ldapi:/// -F /opt/zimbra/data/ldap/config
    zimbra 16222 0.0 0.1 10736 7008 ? Ss 07:52 0:04 /opt/zimbra/libexec/logswatch --config-file=/opt/zimbra/conf/logswatchrc --use-cpan-file-tail --pid-file=/opt/zimbra/log/logswatch.pid --daemon --script-dir=/opt/zimbra/data/tmp -t /var/log/zimbra-stats.log
    zimbra 16223 0.0 0.1 10028 6340 ? S 07:52 0:03 /usr/bin/perl /opt/zimbra/libexec/zmlogger
    zimbra 16295 0.0 0.0 8708 3960 ? S 07:52 0:00 zmlogger: zmrrdfetch: server
    zimbra 16323 0.0 0.1 11104 7616 ? Ss 07:52 0:24 /usr/bin/perl /opt/zimbra/libexec/zmmtaconfig
    zimbra 16337 0.0 0.0 1812 568 ? S 07:52 0:00 /bin/sh /opt/zimbra/mysql/bin/mysqld_safe --defaults-file=/opt/zimbra/conf/my.cnf --external-locking --log-error=/opt/zimbra/log/mysql_error.log --ledir=/opt/zimbra/mysql/libexec
    zimbra 16436 0.1 3.2 419532 131724 ? Sl 07:52 0:24 /opt/zimbra/mysql/libexec/mysqld --defaults-file=/opt/zimbra/conf/my.cnf --basedir=/opt/zimbra/mysql --datadir=/opt/zimbra/db/data --pid-file=/opt/zimbra/db/mysql.pid --skip-external-locking --port=7306 --socket=/opt/zimbra/db/mysql.sock --external-locking
    root 18085 0.0 0.0 1724 380 ? Ss 07:53 0:00 /opt/zimbra/libexec/zmmailboxdmgr start -Dfile.encoding=UTF-8 -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=60 -XX:+UseConcMarkSweepGC -XX:NewRatio=2 -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -Xss256k -Xms1595m -Xmx1595m -Xmn398m
    zimbra 18086 0.7 15.0 2067068 614316 ? Sl 07:53 2:49 /opt/zimbra/java/bin/java -Dfile.encoding=UTF-8 -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=60 -XX:+UseConcMarkSweepGC -XX:NewRatio=2 -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -Xss256k -Xms1595m -Xmx1595m -Xmn398m -Djava.io.tmpdir=/opt/zimbra/mailboxd/work -Djava.library.path=/opt/zimbra/lib -Djava.endorsed.dirs=/opt/zimbra/mailboxd/common/endorsed -Dzimbra.config=/opt/zimbra/conf/localconfig.xml -Djetty.home=/opt/zimbra/mailboxd -DSTART=/opt/zimbra/mailboxd/etc/start.config -jar /opt/zimbra/mailboxd/start.jar /opt/zimbra/mailboxd/etc/jetty.properties /opt/zimbra/mailboxd/etc/jetty-setuid.xml /opt/zimbra/mailboxd/etc/jetty.xml
    zimbra 18129 0.0 1.5 74508 63960 ? Ss 07:53 0:02 amavisd (master)
    zimbra 18168 0.1 0.0 15192 1840 ? Ss 07:53 0:26 /opt/zimbra/clamav/bin/freshclam --config-file=/opt/zimbra/conf/freshclam.conf --quiet --daemon --checks=12
    zimbra 18268 0.2 4.9 241492 200568 ? Ssl 07:53 0:50 /opt/zimbra/clamav/sbin/clamd --config-file=/opt/zimbra/conf/clamd.conf
    zimbra 18276 0.0 0.1 7784 4920 ? S 07:53 0:00 /usr/bin/perl /opt/zimbra/libexec/swatch --config-file=/opt/zimbra/conf/swatchrc --use-cpan-file-tail --script-dir=/opt/zimbra/data/tmp -t /var/log/zimbra.log
    zimbra 18286 0.0 0.1 10744 7928 ? S 07:53 0:04 /usr/bin/perl /opt/zimbra/data/tmp/.swatch_script.18276
    zimbra 18287 0.0 0.1 12840 6852 ? Ss 07:53 0:00 /opt/zimbra/httpd-2.2.17/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra 18288 0.0 0.1 12840 6108 ? S 07:53 0:00 /opt/zimbra/httpd-2.2.17/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra 18291 0.0 0.1 12840 6108 ? S 07:53 0:00 /opt/zimbra/httpd-2.2.17/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra 18293 0.0 0.1 12840 6108 ? S 07:53 0:00 /opt/zimbra/httpd-2.2.17/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra 18295 0.0 0.1 12840 6108 ? S 07:53 0:00 /opt/zimbra/httpd-2.2.17/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    zimbra 18297 0.0 0.1 12840 6108 ? S 07:53 0:00 /opt/zimbra/httpd-2.2.17/bin/httpd -k start -f /opt/zimbra/conf/httpd.conf
    root 19871 0.0 0.0 7488 1808 ? Ss 07:54 0:00 /opt/zimbra/postfix/libexec/master
    zimbra 19882 0.0 0.0 8184 3364 ? Ss 07:54 0:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra 19884 0.0 0.0 8184 3348 ? S 07:54 0:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra 19886 0.0 0.0 8184 3348 ? S 07:54 0:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra 19889 0.0 0.0 8184 3348 ? S 07:54 0:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra 19890 0.0 0.0 8184 3348 ? S 07:54 0:00 /opt/zimbra/cyrus-sasl/sbin/saslauthd -r -a zimbra
    zimbra 20172 0.0 0.1 7480 4744 ? S 07:54 0:07 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-proc
    zimbra 20174 0.0 0.1 7340 4556 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-cpu
    zimbra 20176 0.0 0.1 7340 4580 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-vm
    zimbra 20178 0.0 0.1 7344 4576 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-io -x
    zimbra 20180 0.0 0.1 7340 4524 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-df
    zimbra 20183 0.0 0.1 7340 4556 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-io
    zimbra 20186 0.0 0.1 7552 4556 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-fd
    zimbra 20190 0.0 0.1 7900 5048 ? S 07:54 0:18 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-allprocs
    zimbra 20193 0.0 0.1 7348 4660 ? S 07:54 0:02 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-mysql
    zimbra 20198 0.0 0.1 7208 4508 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-mtaqueue
    root 20502 0.0 0.1 7408 4684 ? S 07:54 0:00 /usr/bin/perl -w /opt/zimbra/libexec/zmstat-fd
    zimbra 20730 0.0 0.0 1880 624 ? S 07:54 0:00 /usr/bin/vmstat -n -S K 30
    zimbra 20731 0.0 0.0 2052 760 ? S 07:54 0:00 /usr/bin/iostat -d -k -x 30
    zimbra 20732 0.0 0.0 2052 760 ? S 07:54 0:00 /usr/bin/iostat -d -k 30
    zimbra 31259 0.0 1.7 79320 69636 ? S 12:33 0:06 amavisd (ch6-avail)


    I run:
    grep zimbra /etc/sudoers

    the command returns:

    %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmstat-fd *
    %zimbra ALL=NOPASSWD:/opt/zimbra/openldap/libexec/slapd
    %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmslapd
    %zimbra ALL=NOPASSWD:/opt/zimbra/postfix/sbin/postfix, /opt/zimbra/postfix/sbin/postalias, /opt/zimbra/postfix/sbin/qshape.pl, /opt/zimbra/postfix/sbin/postconf,/opt/zimbra/postfix/sbin/postsuper
    %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmqstat,/opt/zimbra/libexec/zmmtastatus
    %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmmailboxdmgr
    %zimbra ALL=NOPASSWD:/opt/zimbra/bin/zmcertmgr

    Now my question is, is zimbra running as root? And if it is how can I change it?


    Zimbra version 6.0.14_GA_2928
    Ubuntu 8.04

    Thanks in advance.

    Ron

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by Brotherbbad View Post
    Now my question is, is zimbra running as root?
    Not necessarily, what makes you think that Zimbra is running as root other than the output you've shown here? Onr of the Jave processes does run as root:

    [CODE]ps -ef | grep '/opt/zimbra' | grep "java" | grep -v "zmmailboxmgr" | awk '{print $1}'

    zimbra
    root
    zimbra[/QUOTE]What does that output show on your server? If you posted details about the backup script and the errors you've seen maybe someone can offer some advice. Have you done any upgrade of ZCS during the time you've been using the backup script?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Dec 2011
    Posts
    14
    Rep Power
    3

    Default

    H Bill, Thanks for the timely reply. Sorry for not posting more complete information on the issue, but I wasn't sure what would be relevant. The script that I'm using came from this thread: http://www.zimbra.com/forums/adminis...y-version.html. The error that it spits out is Zimbra user should never be root! Please keep in mind that it is intermittent... the first time it fixed itself, this last time I ran zmfixperms --extended. I have not done any updates to Zimbra since the initial installation... the output of the command that you suggested ( ps -ef | grep '/opt/zimbra' | grep "java" | grep -v "zmmailboxmgr" | awk '{print $1}' ) is:

    root
    zimbra

    I am not currently experiencing the issue... it last happened late last week and has only happened twice. I don't play with this server at all.... it has a job and it works.... if it's not broken don't fix it, is my motto. I have earlier installed a couple of utilities like denyhosts, and htop, but that was long ago (about a year or so...) The problem just started recently say within the past two months.

    My real question, I guess is, how do I verify that zimbra is actually running as the zimbra user? I thought (perhaps incorrectly) that the command in my earlier post did just that. That is why I assumed that zimbra was running as root.

    I did do quite a bit of searching before posting... I found a lot of information in this thread: http://www.zimbra.com/forums/adminis...mbra-root.html

    Please forgive my ignorance... I'm a Windows user trying to convert... :0

    Thanks in advance for any help or suggestions that you may offer.

Similar Threads

  1. how to get email for root or root@localhost
    By zmgd in forum Administrators
    Replies: 1
    Last Post: 01-20-2014, 01:34 PM
  2. [SOLVED] Help, I think I am running Zimbra as root!
    By primaxx in forum Administrators
    Replies: 9
    Last Post: 10-06-2010, 12:04 PM
  3. Replies: 2
    Last Post: 03-20-2010, 01:11 AM
  4. Where is the Zimbra Root CA Cert
    By phl4kx in forum Administrators
    Replies: 0
    Last Post: 03-20-2009, 12:00 PM
  5. Replies: 29
    Last Post: 03-06-2007, 01:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •