logaricheck crash on Permission denied

Bug #1010478 reported by Dominique Potvin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
logaricheck (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Stéphane Graber
Quantal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
When running logaricheck as a user (nagios) logaricheck crash when it's not able to read a mount point.

[Test Case]
login to a desktop as a user to have a gvfs mounted on the system and run the command

root@server:~# sudo -u nagios /usr/lib/nagios/plugins/check_logaricheck disk
Traceback (most recent call last):
  File "/usr/lib/nagios/plugins/check_logaricheck", line 497, in <module>
    cmd.engage()
  File "/usr/lib/nagios/plugins/check_logaricheck", line 492, in engage
    getattr(clazz(), func)(self.config)
  File "/usr/lib/nagios/plugins/check_logaricheck", line 323, in check_disk_usage
    return self.check_usage(FileSystemSpaceUsage, config.disk, config.fstype_ignore_list)
  File "/usr/lib/nagios/plugins/check_logaricheck", line 333, in check_usage
    for fsinfo in get_all_filesystem_info():
  File "/usr/lib/nagios/plugins/check_logaricheck", line 95, in get_all_filesystem_info
    fs = FileSystemInfo(splitted_line[0], splitted_line[1], splitted_line[2])
  File "/usr/lib/nagios/plugins/check_logaricheck", line 53, in __init__
    statvfs_result = os.statvfs(self.mount_path)
OSError: [Errno 13] Permission denied: '/home/testuser/.gvfs'

Apply patch #17 and it solves the problem
http://bazaar.launchpad.net/~logaricheck-dev/logaricheck/main/revision/17

[Regression Potential]
May hide other errors

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in logaricheck (Ubuntu):
status: New → Confirmed
Changed in logaricheck (Ubuntu Precise):
status: New → In Progress
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package logaricheck - 0.6.1-0ubuntu1

---------------
logaricheck (0.6.1-0ubuntu1) quantal; urgency=low

  * New upstream bugfix release.
    - logaricheck crash on Permission denied (LP: #1010478)
    - Replace python bare excepts by proper excepts.
 -- Stephane Graber <email address hidden> Fri, 08 Jun 2012 10:08:59 -0400

Changed in logaricheck (Ubuntu Quantal):
status: Confirmed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Dominique, or anyone else affected,

Accepted logaricheck into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in logaricheck (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Stéphane Graber (stgraber) wrote :

stgraber@castiana:~/data/code/edubuntu-website/content$ sudo -u nobody /usr/lib/nagios/plugins/check_logaricheck disk
Traceback (most recent call last):
  File "/usr/lib/nagios/plugins/check_logaricheck", line 497, in <module>
    cmd.engage()
  File "/usr/lib/nagios/plugins/check_logaricheck", line 492, in engage
    getattr(clazz(), func)(self.config)
  File "/usr/lib/nagios/plugins/check_logaricheck", line 323, in check_disk_usage
    return self.check_usage(FileSystemSpaceUsage, config.disk, config.fstype_ignore_list)
  File "/usr/lib/nagios/plugins/check_logaricheck", line 333, in check_usage
    for fsinfo in get_all_filesystem_info():
  File "/usr/lib/nagios/plugins/check_logaricheck", line 95, in get_all_filesystem_info
    fs = FileSystemInfo(splitted_line[0], splitted_line[1], splitted_line[2])
  File "/usr/lib/nagios/plugins/check_logaricheck", line 53, in __init__
    statvfs_result = os.statvfs(self.mount_path)
OSError: [Errno 13] Permission denied: '/home/stgraber/.gvfs'

After the upgrade:

stgraber@castiana:~/data/code/edubuntu-website/content$ sudo -u nobody /usr/lib/nagios/plugins/check_logaricheck disk
OK /: 46% 5.65 GB / 13.92 GB used (warn=91% crit=97%)

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package logaricheck - 0.6.0-0ubuntu1.1

---------------
logaricheck (0.6.0-0ubuntu1.1) precise-proposed; urgency=low

  * logaricheck crash on Permission denied (LP: #1010478)
 -- Stephane Graber <email address hidden> Fri, 08 Jun 2012 10:16:36 -0400

Changed in logaricheck (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.