Power Failure Now NginX Restart Problem

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:

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: