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 Initial Version
Reported by: | qiulang | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | nginx redis |
Description
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?