Opened 12 months ago
Last modified 11 months ago
#68596 assigned defect
After installing Nginx, I can't shut down Redis (also installed by port) because the error "Failed opening the temp RDB file temp-8712.rdb (in server root dir /opt/local/var/log/nginx) for saving: Permission denied" — at Version 4
Reported by: | qiulang | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | dgilman (David Gilman) | |
Port: | nginx redis |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
After installing Nginx, I can't shut down Redis (also installed by port) because the error "Failed opening the temp RDB file temp-8712.rdb (in server root dir /opt/local/var/log/nginx) for saving: Permission denied."
After installing Nginx, when started it, I got the error because the directory /opt/local/var/log/nginx is owned by root.
% nginx nginx: [alert] could not open error log file: open() "/opt/local/var/log/nginx/error.log" failed (13: Permission denied) 2023/10/31 11:28:09 [emerg] 8608#0: mkdir() "/opt/local/var/run/nginx/client_body_temp" failed (13: Permission denied)
So I run nginx with sudo nginx.
But when I just run redis-server (without sudo redis-server) and later want to shut it down, I got the error "Failed opening the temp RDB file temp-8712.rdb (in server root dir /opt/local/var/log/nginx) for saving: Permission denied." Why does Redis need to write log into dir /opt/local/var/log/nginx?
My second question is do I need to run nginx with sudo ngixn? When I run all other tool installed by port I don't need to run them with sudo.
Change History (4)
comment:1 Changed 12 months ago by qiulang
Description: | modified (diff) |
---|
comment:2 Changed 12 months ago by jmroot (Joshua Root)
Cc: | dgilman added |
---|---|
Keywords: | nginx redis removed |
Owner: | set to Schamschula |
Port: | redis added |
Status: | new → assigned |
comment:3 Changed 12 months ago by Schamschula (Marius Schamschula)
comment:4 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
You can change the user in
nginx.conf
. The upstream default isroot
, as it is on my FreeBSD servers.Look for
#user nobody;
near the top of the file. Change it as needed.