# Power Failure Now NginX Restart Problem

**URL:** <https://www.ruby-forum.com/t/power-failure-now-nginx-restart-problem/218082>\
**Category:** NGINX\
**Created:** [March 20, 2012, 5:17pm UTC](https://www.ruby-forum.com/t/power-failure-now-nginx-restart-problem/218082 "2012-03-20T17:17:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 20, 2012, 5:17pm UTC](https://www.ruby-forum.com/t/power-failure-now-nginx-restart-problem/218082/1 "2012-03-20T17:17:56Z")

</div>

This morning we had one of those power disruptions (the kind that last  
just long enough to cause you to reset the clock). Now when I restart  
Nginx I get the error that it can’t open the error.log file

/var/log/nginx/error.log failed (13:permission denied)

also get the failure for the configuration file

/var/run/nginx.pid failed (13:permission denied)  
configuration file /etc/nginx/nginx.conf test failed

(the syntax for the configuration file is ok)

Before this nginx was running with no problems.  
Why am I get these errors and how do I correct them?

Posted at Nginx Forum:

> **[Power Failure Now NginX Restart Problem](https://forum.nginx.org/read.php?2,224106,224106#msg-224106)**
>
> This morning we had one of those power disruptions (the kind that last just long enough to cause you to reset the clock). Now when I restart Nginx I get the error that it can't open the error.log file /var/log/nginx/error.log failed (13:permission...

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [March 20, 2012, 6:27pm UTC](https://www.ruby-forum.com/t/power-failure-now-nginx-restart-problem/218082/2 "2012-03-20T18:27:03Z")

</div>

Found the problem!!!  
First problem. My OS is Ubunto 11.01, when I installed it as a server  
setup it automatically installed Apache as well and had set apache to  
start at boot time. So what happened was Apache, grabbed port 80 before  
nginx could. Then the second problem occurred when I logged in and  
tried to restart nginx, for some reason I didn’t have the permission as  
sudo. I’ll have to fix that, but now the server is back up and running  
from boot. Whew!

Posted at Nginx Forum:

> **[Re: Power Failure Now NginX Restart Problem](https://forum.nginx.org/read.php?2,224106,224109#msg-224109)**
>
> This morning we had one of those power disruptions (the kind that last just long enough to cause you to reset the clock). Now when I restart Nginx I get the error that it can't open the error.log file /var/log/nginx/error.log failed (13:permission...
