39
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

nginx ファイルアップロードできない・・・

Posted at

アップロードボタンを押したら500エラー発生!
Railsのエラーログには何も出てないし、
unicornのエラーログにも何も出てこない。

・・・

うわーどうしよう!
そうだ、nginxだ。
早速エラーログ確認。

open() "/var/lib/nginx/tmp/client_body/0000000016" failed (13: Permission denied)

/var/lib/nginxの所有者が/etc/nginx/nginx.confのuserになっていないのがいけませんでした。

$ sudo chown -R 【user名】 /var/lib/nginx
$ sudo service nginx reload

これにて無事解決。めでたし。

39
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
39
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?