After install, can't access /MaaS, there is a permission error with the log

Bug #955400 reported by Francis J. Lacoste
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas (Ubuntu)
Fix Released
High
Andres Rodriguez

Bug Description

After installing maas 0.1+bzr266+dfsg-0+267+20~precise1, I try to access http://localhost/MaaS and I get an Internal Server Error. Relevant part of the error_log:

[Wed Mar 14 19:02:10 2012] [notice] Apache/2.2.22 (Ubuntu) mod_python/3.3.1 Pyth
on/2.7.3rc1 mod_wsgi/3.3 configured -- resuming normal operations
[Wed Mar 14 19:25:38 2012] [error] [client 127.0.0.1] File does not exist: /var/
www/Maas
[Wed Mar 14 19:25:38 2012] [error] [client 127.0.0.1] File does not exist: /var/
www/favicon.ico
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] mod_wsgi (pid=26497): Exce
ption occurred processing WSGI script '/usr/share/maas/wsgi.py'.
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] Traceback (most recent cal
l last):
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7
/dist-packages/django/core/handlers/wsgi.py", line 250, in __call__
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] self.load_middleware()
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7
/dist-packages/django/core/handlers/base.py", line 39, in load_middleware
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] for middleware_path in
 settings.MIDDLEWARE_CLASSES:

[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 276, in __getattr__
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] self._setup()
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] self._wrapped = Settings(settings_module)
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 139, in __init__
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] logging_config_func(self.LOGGING)
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/logging/config.py", line 777, in dictConfig
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] dictConfigClass(config).configure()
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/logging/config.py", line 575, in configure
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] '%r: %s' % (name, e))
[Wed Mar 14 19:25:43 2012] [error] [client 127.0.0.1] ValueError: Unable to configure handler 'log': [Errno 2] No such file or directory: '/var/log/maas/maas.log'

Doing:

$ sudo touch /var/log/maas/maas.log
$ sudo chown root.www-data /var/log/maas/maas.log
$ sudo chmod 620 /var/log/maas/maas.log

fixes the issue.

Related branches

Changed in maas (Ubuntu):
assignee: nobody → Andres Rodriguez (andreserl)
status: New → In Progress
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Note that the /var/log/maas/oops directory is also owned by root.root and doesn't allow www-data to write to it, which it will need to write OOPSes.

Dave Walker (davewalker)
Changed in maas (Ubuntu):
importance: Undecided → High
Changed in maas (Ubuntu):
status: In Progress → 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.