# Logrotate error

**URL:** https://discourse.roots.io/t/logrotate-error/6492
**Category:** trellis
**Created:** 2016-04-19T06:55:35Z
**Posts:** 17
**Showing post:** 7 of 17

## Post 7 by @mathewc — 2016-04-22T19:54:34Z

Permissions look fine, you can manually fix the one log file (x.log.4.gz) if you need to - it’s an artifact of how nginx is running with roots/trellis. You can avoid it altogether in future installs by adding a script to be run manually or by ansible after the deploy.

One common reason for the error you’re seeing is that Upstart sucks. Quick check-- are both the Upstart and systemV initialization configs present (`/etc/init/nginx` and `/etc/init.d/nginx`)? You’re running on Ubuntu 14.04 (Trusty) right?

If they’re both there, stop ngninx, delete the Upstart one and restart. Should work fine. This was resolved I thought in later 1.8 versions and then for reasons I am not familiar with, it seems to have returned in nginx 1.9 mainlines.

Let me know if that does/doesn’t do the trick for your server.

See, the [service manpage](http://manpages.ubuntu.com/manpages/wily/man8/service.8.html) for more info.

> The existence of an upstart job of the same name as a script in /etc/init.d  
> will cause the upstart job to take precedence over the init.d script.

---

_[View the full topic](https://discourse.roots.io/t/logrotate-error/6492)._
