permission-denied - nginx open() "..." failed (13: Permission denied)
某草草
某草草 2017-05-16 17:25:46
0
1
793

Use PHP to upload files, and then generate a thumbnail. The thumbnail access is normal, and the uploaded file access nginx prompts 403 error:

2014/12/19 14:41:41 [error] 19433#0: *16 open() "/var/www/uploads/files/gmail-theme-tree.png" failed (13: Permission denied)

View file permissions:

-rw-r--r--. 1 www-data www-data 178878 Dec 19 14:48 gmail-theme-tree.png
-rw-r--r--. 1 www-data www-data   2729 Dec 19 14:48 gmail-theme-tree-_x22.png

Above gmail-theme-tree-_x22.png The access is normal, gmail-theme-tree.png The access prompt is "403 Forbidden".

Ask for advice!

某草草
某草草

reply all(1)
仅有的幸福
  1. Restart Nginx
  2. Check if Nginx is running as www-data
  3. Check if www-data is in /var/www/uploads/files/gmail-theme-tree.png Directories at all levels above have x permissions.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!