-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
This is a silly issue. The fix is a tad obvious. But others might run into this, so I thought I'd share. This happens in macOS with the default configuration, because there's no www-data user by default. For reference, I installed nginx with brew.
When uploading an image, Wordpress shows an HTTP error. The log is:
open() "/usr/local/var/run/nginx/client_body_temp/0000000001" failed (13: Permission denied)
So obviously, the problem is that I started nginx without sudo. (I like it that way.) If I sudo nginx I have the permission to write files to /usr/local/var/run/nginx/, so the upload works.
Even more obvious, the better solution is to start have a proper user for nginx:
# in nginx.conf
user www www;
The above applies to macOS. I'm not sure if in Linux www-data is preferred.
Metadata
Metadata
Assignees
Labels
No labels