Bug #2248

PHP Error mkdir() Uncaught AppKitPHPError

Added by mopp over 4 years ago. Updated over 1 year ago.

Status:ResolvedStart date:01/04/2012
Priority:NormalDue date:
Assignee:mhein% Done:


Category:ReportingEstimated time:1.00 hour
Target version:Icinga 1.x - 1.6.2
Icinga Version:1.0.0 DB Type:UNKNOWN
Icinga Web Version:1.0.0 DB Version:---
IDO Version:1.0.0 Browser Version:---
OS Version:---


Icinga Web 1.6.1
Icinga Reports 1.6.0 tried to mkdir /usr/share/icinga-web/app/modules/Reporting/data/tmp. Unfortunately the directory had no write permissions.

I got the following error:
[fatal] Uncaught AppKitPHPError: PHP Error mkdir(): Permission denied (/usr/share/icinga-web/app/modules/Reporting/models/ReportUserFileModel.class.php:61) (/usr/share/icinga-web/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php:37)

The "mkdir($this->__dir);" caused the error. If mkdir fails the program interrupts without an useful error message.

Associated revisions

Revision becb8fe6
Added by mhein over 4 years ago

  • Fixed error handling reporting module (fixes #2248, ref #2277)

Revision ca46fab5
Added by mhein over 4 years ago

  • Fixed error handling reporting module (fixes #2248, ref #2277)




#1 Updated by mhein over 4 years ago

  • Assignee set to mhein
  • Target version changed from 1.6.2 to 1.7

#2 Updated by mhein over 4 years ago

  • Status changed from New to Feedback

I tested and tried to reproduce:

$ tail app/Makefile.in | grep data
    -and ! -path "*Reporting/data*"`; \
    $(INSTALL) -m 755 $(INSTALL_OPTS_WEB) -d $(DESTDIR)$(prefix)/app/data/tmp
    $(INSTALL) -m 755 $(INSTALL_OPTS_WEB) -d $(DESTDIR)$(prefix)/app/modules/Reporting/data

The r1.6 and current master sets the web server user as owner for the reporting temp directories.

Are there any errors for your install?

Otherwise I would close that bug.

Kind regards,

#3 Updated by mopp over 4 years ago

Sorry for the missunderstanding, the error is not related to the "make install".

The intention of the bug report was to report an error in the error handling of the php script.
The following code from ReportUserFileModel.class.php should catch problems with the "mkdir($this->__dir);", but unfortunately it doesn't work.
To test it do the following: Remove tmp in app/modules/Reporting/data and modify the permissions of app/modules/Reporting/ to prohibit write access. You will get the error message I mentioned.
If the code below would have worked a message like "Could not create dir: /usr/share/icinga-web/app/modules/Reporting/data/tmp" should have be shown instead of the "Uncaught AppKitPHPError: PHP Error mkdir(): Permission denied"

$this->__dir = AgaviConfig::get('modules.reporting.dir.download');

if (!is_dir($this->__dir)) {

if (!is_dir($this->__dir)) {
    throw new AppKitModelException('Could not create dir: '. $this->__dir);
} else {

#4 Updated by mhein over 4 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100

#5 Updated by mhein about 4 years ago

  • Target version changed from 1.7 to 1.6.2

#6 Updated by dnsmichi over 3 years ago

  • Project changed from Web to Report Module

#7 Updated by dnsmichi over 1 year ago

  • Project changed from Report Module to Web
  • Category set to Reporting
  • Icinga Version set to 1.0.0
  • Icinga Web Version set to 1.0.0
  • IDO Version set to 1.0.0
  • OS Version set to ---
  • DB Type set to UNKNOWN
  • DB Version set to ---
  • Browser Version set to ---

Also available in: Atom PDF