Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-2009, 11:59 AM
ple ple is offline
Loyal Member
 
Posts: 84
Red face zmdisklog cron job fails after upgrade to RHAS5.4

Hi,
I went ahead to upgrade my devel. box to RHAS5.4 earlier this morning. After I reboot the server, I keep getting an email from "/opt/zimbra/libexec/zmdisklog" cron job saying that "df: `/dev/sda1': Permission denied". The permission doesn't change as I compared to another box. This is what I get with ls -l "brw-r----- 1 root disk 8, 1 Sep 10 13:18 /dev/sda1"
Thanks in advance,
PL
Reply With Quote
  #2 (permalink)  
Old 09-11-2009, 12:42 AM
Intermediate Member
 
Posts: 19
Default

Same problem here... This is the result of executing df -H as root user:
[zimbra@mail ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
58849212 21789384 34022236 40% /
/dev/sda1 101086 24230 71637 26% /boot
tmpfs 1037780 0 1037780 0% /dev/shm

However, executing it as user zimbra produces this output:
df: `/dev/mapper/VolGroup00-LogVol00': Permission denied
df: `/dev/sda1': Permission denied

Our OS is RHEL 5.4 (it's been upgraded from RHEL 5.3).

Any ideas?
Reply With Quote
  #3 (permalink)  
Old 09-11-2009, 01:52 AM
Intermediate Member
 
Posts: 19
Default

Problem solved:

Add user 'zimbra' to 'disk' group.

It works now...

Last edited by milesteg; 09-11-2009 at 01:52 AM.. Reason: grammatical error
Reply With Quote
  #4 (permalink)  
Old 09-11-2009, 01:54 AM
Moderator
 
Posts: 7,928
Default

Please check that SELinux did not get enabled when the upgrade was performed.
__________________
Reply With Quote
  #5 (permalink)  
Old 09-11-2009, 07:33 AM
ple ple is offline
Loyal Member
 
Posts: 84
Default Update

SELinux is disabled on my devel. system. Now that 5.4 is installed on the production server. The fix from milesteg seems to fix just the sda and sdb volumes on my production box. I'm still getting permission denied from /dev/mapper/volumes. Any suggestion?
Thanks.
PL

Last edited by ple; 09-15-2009 at 01:30 PM..
Reply With Quote
  #6 (permalink)  
Old 09-23-2009, 07:10 AM
Trained Alumni
 
Posts: 4
Default Run zmdisklog with sudo

Quote:
Originally Posted by ple View Post
SELinux is disabled on my devel. system. Now that 5.4 is installed on the production server. The fix from milesteg seems to fix just the sda and sdb volumes on my production box. I'm still getting permission denied from /dev/mapper/volumes. Any suggestion?
Thanks.
PL
Are you running RHEL 5.4 64bit by any chance?

While Adding the zimbra user to the disk group on the 32bit test box was the sufficient solution, the same didn't work on the 64bit production box.

Bare in mind that I'm not sure this is the proper way to fix this issue, but it seems that this is the only script "zmdisklog" run via crontab that gets the "Permission denied" error trying to run df against the /dev/mapper/VolGroup00-LogVol0** entry after the RHEL 5.4 update.

Anyway, here is what I did as a quick fix to resolve it:

1- Add a line in sudo (via visudo) for the "zimbra" user as follows:

Code:
%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmdisklog
2- Modify the zimbra crontab to add the sudo command to the zmdisklog line:

Code:
*/10 * * * * sudo /opt/zimbra/libexec/zmdisklog

# You should test the command above by hand as the zimbra user before modifying the crontab to make sure it works the way it should.

## The examples here assume that you have your software installed under the default /opt/zimbra path
Reply With Quote
  #7 (permalink)  
Old 09-25-2009, 06:02 AM
Active Member
 
Posts: 28
Default /opt/zimbra/libexec/zmdisklog

I have the same issue, but if you look in the logs, the cron job is still working, but it is generating some extra output to stderr due to zmdisklog doing a "df" on the device files, rather than the mount points. For some reason in Redhat 5.4, non-root users cannot read the device files by default.

Looking at line 81 in the perl script /opt/zimbra/libexec/zmdisklog , "df" is being run on the device file ($dev) which is what generates the error. But then on line 85 it proceeds to run "df" on the mount points ($mp) which succeeds. I'm not sure why the script does it twice... probably an oversight.

If you feel brave you could try commenting out lines 81-83 and that should remove the error.

-Matt

Last edited by mattg1; 09-25-2009 at 06:02 AM.. Reason: reformat
Reply With Quote
  #8 (permalink)  
Old 10-02-2009, 06:25 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by mattg1 View Post
I have the same issue, but if you look in the logs, the cron job is still working, but it is generating some extra output to stderr due to zmdisklog doing a "df" on the device files, rather than the mount points. For some reason in Redhat 5.4, non-root users cannot read the device files by default.

Looking at line 81 in the perl script /opt/zimbra/libexec/zmdisklog , "df" is being run on the device file ($dev) which is what generates the error. But then on line 85 it proceeds to run "df" on the mount points ($mp) which succeeds. I'm not sure why the script does it twice... probably an oversight.

If you feel brave you could try commenting out lines 81-83 and that should remove the error.

-Matt
I have this exact issue and am going to try this fix. I'll let you know if it works.
Reply With Quote
  #9 (permalink)  
Old 10-02-2009, 07:43 AM
ple ple is offline
Loyal Member
 
Posts: 84
Default Update

I've got to be honest; I'm not that brave to try it on a prod. box. Unfortunately, my devel. box doesn't have logical volumes. Anyhow, I'd appreciate if you could share the results. By the way, this, according to Zimbra, is a bug. You can track it from here.
Thanks.
PL
Reply With Quote
  #10 (permalink)  
Old 10-05-2009, 12:47 AM
Member
 
Posts: 11
Default

I can confirm that commenting out lines 81-83 of /opt/zimbra/libexec/zmdisklog seems to fix the problem on one of my systems.

I have not observed any unwanted side effects.

Many thanks.
Guy
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.