Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP error when uploading assets. #11

Open
filipecatraia opened this issue Nov 21, 2016 · 2 comments
Open

HTTP error when uploading assets. #11

filipecatraia opened this issue Nov 21, 2016 · 2 comments

Comments

@filipecatraia
Copy link

filipecatraia commented Nov 21, 2016

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.

@pedropenduko
Copy link

Have you tried adding your non-sudo user to group www ?

@filipecatraia
Copy link
Author

@pedropenduko yeah, that might work as well (haven't tested). But isn't a separate user for nginx the preferred option? (I honestly never know.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants