Bug #404

Piboxwww log can't be written to

Added by Hammel almost 3 years ago. Updated almost 3 years ago.

Status:ClosedStart date:05 Dec 2014
Priority:ImmediateDue date:
Assignee:Hammel% Done:

100%

Category:-
Target version:PiBox - 0.10.0
Severity:03 - Medium

Description

The monkey log is /var/log/monkey.log. However, this file doesn't exist and /var/log is only accessible by root. When monkey tries to create the file it fails.

To fix this the init script needs to create an empty log and change its owner to nobody.nobody, which is the user being used to run monkey.

Associated revisions

Revision 1ef7644c
Added by Hammel almost 3 years ago

RM #404: Added init script to make sure a log file exists and is writable by the web server on every restart.

History

#1 Updated by Hammel almost 3 years ago

  • Subject changed from Monkey log can't be written to to Piboxwww log can't be written to
  • Status changed from New to In Progress
  • % Done changed from 0 to 20

The package installation actually has to be updated because the log in question is from the web application, not from monkey itself. So the postinst script has to be updated to create the log file and change its ownership and permissions.

#2 Updated by Hammel almost 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 20 to 100

Updated, tested and pushed upstream.

Closing issue.

#3 Updated by Hammel almost 3 years ago

  • Project changed from monkey to piboxwww

#4 Updated by Hammel almost 3 years ago

  • Status changed from Closed to In Progress
  • % Done changed from 100 to 50

Reopening this bug. Turns out that a reboot wipes the log file because /var/log/ is mapped to a tmpfs.

So an init script has to be run to create the log file at boot time. That means adding an init script to piboxwww, which is the simplest solution, although current startup times are so bad I'd rather have it done some other way.

For now, just add a startup script that creates the log file for use by piboxwww.</p>

#5 Updated by Hammel almost 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

Added init script to recreate a log file on every reboot. Tested on target, committed and pushed.

Closing issue.

Also available in: Atom PDF