Open /var/log/nginx/error.log Failed
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring
"/var/run/nginx.pid" Failed (13: Permission Denied)
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question nginx open() failed (13 permission denied) x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; starting nginx nginx emerg open() /etc/nginx/nginx.conf failed (13 permission denied) it only takes a minute: Sign up nginx on Ubuntu: Permission denied up vote 16 down vote favorite 6 I am new to system administration. After installing nginx via puppet on Ubuntu I get the following output: [alert] could not
/var/log/nginx/access.log Failed (2 No Such File Or Directory)
open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) [warn] 1898#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 [emerg] 1898#0: open() "/var/log/nginx/access.log" failed (13: Permission denied) How do I get rid of all of these messages? I don't want to use command line directly (chown / chmod) and repeat it every time I create a new server. Therefore, I am thinking of what has to be added to
Nginx Access Log Permissions
the puppet manifest. What is the best sysadmin practice in this case: to change owner / permissions for /var/log/nginx or to store logs in different location? If chown / chmod is the way to go, which specific permissions would ensure the highest level of security? I tried this, but it didn't help: file { '/var/log/nginx': ensure => directory, mode => '0755', owner => 'www-data', group => 'www-data', recurse => true } Edited: vagrant@precise64:~$ ps aux | grep [n]ginx root 1001 0.0 0.1 62908 1388 ? Ss 08:47 0:00 nginx: master process /usr/sbin/nginx www-data 1002 0.0 0.1 63260 1696 ? S 08:47 0:00 nginx: worker process www-data 1003 0.0 0.1 63260 1696 ? S 08:47 0:00 nginx: worker process www-data 1004 0.0 0.1 63260 1696 ? S 08:47 0:00 nginx: worker process www-data 1005 0.0 0.1 63260 1696 ? S 08:47 0:00 nginx: worker process ubuntu nginx debian vagrant puppet share|improve this question edited Sep 10 '13 at 9:37 asked Sep 10 '13 at 9:12 krn 2,33664267 Are you sure the puppet code was applied (using vagrant provision for example)? Is /etc/nginx/nginx.conf using www-data or nginx to run nginx non-master processes? –Terry Wang Sep 10 '13 at 23:12 add a comment| 8 Answers 8 active oldest votes up vote 65 down vote Make sure you are running the test as a superuser. sudo nginx -t Or the test wont have all the permissions needed to compl
have one accepted answer. Are you sure you want to replace the current answer with this one? Yes, I'm sure. Changed your mind? You previously open() "/run/nginx.pid" failed marked this answer as accepted. Are you sure you want to unaccept
Nginx Change Error Log Location
it? Yes, I'm sure. Sign Up Log In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community nginx stat permission denied Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: Saphiria Subscribe Subscribed Share 0 Nginx Warnings - How to fix? April 29, 2016 1.9k http://stackoverflow.com/questions/18714902/nginx-on-ubuntu-permission-denied views Nginx Hey! When I I try to restart nginx, after editing sudo nano /etc/nginx/sites-available/default, I get this fail response: Restarting nginx nginx [fail] I then do nginx -t and get this message: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2016/04/28 20:06:07 [warn] 6121#0: the "user" directive makes sense only if the master process runs https://www.digitalocean.com/community/questions/nginx-warnings-how-to-fix with super-user privileges, ignored in /etc/nginx/nginx.conf:1 2016/04/28 20:06:07 [emerg] 6121#0: unexpected "}" in /etc/nginx/sites-enabled/default:84 nginx: configuration file /etc/nginx/nginx.conf test failed So what am I doing wrong and how can I fix it? It seems there is two things going wrong? Thanks in advance. 3 comments 0 Saphiria April 29, 2016 By the way, I was following [https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04](http://) guide. 0 Saphiria April 29, 2016 nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2016/04/28 20:18:01 [warn] 6275#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 2016/04/28 20:18:01 [emerg] 6275#0: open() "/run/nginx.pid" failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed NEW MESSAGE 0 BrookDO MOD April 29, 2016 Hi, What happens if you do sudo nginx -t ? Log In to Comment Leave a Comment Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below. Log In to Comment 1 Answer 0 Saphiria April 29, 2016 [deleted] Reply Log I
Sign in Pricing Blog Support Search GitHub This repository Watch 567 Star 7,720 Fork 1,808 JuliaLang/julia Code https://github.com/JuliaLang/julia/issues/2135 Issues 1,704 Pull requests 419 Projects 4 Pulse Graphs New issue Trouble getting [system] nginx to run as regular user #2135 Closed ackalker opened this Issue Jan 26, 2013 · 4 comments Projects None yet Labels linux upstream won't fix Milestone No milestone Assignees No one assigned 3 participants permission denied ackalker commented Jan 26, 2013 Arch linux, Julia 7435ffa, nginx-1.2.6-1 The current launch-julia-webserver doesn't work with nginx as shipped by Arch Linux when started as a regular (i.e. non-root) user. How to reproduce: $ /usr/bin/launch-julia-webserver Connect to http://localhost:2000/ for the web REPL. SCGI server started on port 2001. 0 open sessions. nginx: [alert] failed (13 permission could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2013/01/26 01:57:22 [emerg] 24586#0: mkdir() "/var/lib/nginx/client-body" failed (13: Permission denied) ^Ccleaning up... exiting... cat: ../logs/nginx.pid: No such file or directory kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] Overriding client_body_temp_path only brings more and more permission errors. This is related to how nginx is configured in Arch Linux (reasonably well locked-down, obviously not intended to be run as a regular user): $ nginx -V nginx version: nginx/1.2.6 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/sbin/nginx --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=http --group=http --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/client-body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-imap --with-imap_ssl_module --with-ipv6 --with-pcre-jit --with-file-aio --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_stub_status_module --add-module=/usr/lib/passenger/ext/nginx Fixing this seems to require quite a few extra directives in Julia's $PREFIX/etc/nginx.conf , and I haven't managed to add all of them yet. I'm quite certain that users of other distros may face similar