I searched on the internet for a while now and I don't find a solution so I am asking here: My question is, why is this file (/etc/init.d/nginx
) not executeable?
I was following the tutorial of Alex yesterday and I got into an issue. Everything worked until the service nginx restart
-command. When I try to run this command I will get
nginx: You don't have permissions to execute nginx.
After googling some time I found a potential answer, but this was already done in the tutorial/walkthrough of Alex:
$ sudo chmod +x /etc/init.d/nginx
Some info if you don't want to read the tutorial:
So I would be very thankful if anyone could help me. Thanks!
Make sure the variables in your init script are correct:
Here's an example script: http://wiki.nginx.org/Nginx-init-ubuntu
For instance, I had to change NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf" to NGINX_CONF_FILE="/etc/nginx/nginx.conf" and it solved my problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With