duanli6834 2015-05-15 09:59
浏览 66

Wordpress无法上传媒体说“不许可”

I just setup a wordpress + nginx, but when I start to write my first blog, there comes a trouble. In admin page, I try to add a picture into media library, it complains "can't create wp-content/uploads/2015/05, permission denied".

Although I search the internet, most of guys are pointing to change ownershipt of "wp-contents/uploads" to be as php-fpm. But yes, I have checked the permission of uploads and also the running user of php-fpm. The worker php-fpm is running under "nginx" user, and namei for uploads:

drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root blog
drwxrwxrwx nginx nginx wp-content
drwxrwxrwx nginx nginx uploads

Then I use auditctl to check the activity on this "uploads" folder and see :

============================

type=PATH msg=audit(05/08/2015 14:07:00.247:1913) : item=1 name=/var/blog/wp-content/uploads/2015 objtype=CREATE
type=PATH msg=audit(05/08/2015 14:07:00.247:1913) : item=0 name=/var/blog/wp-content/uploads/ inode=266 dev=fd:01 mode=dir,777 ouid=nginx ogid=nginx rdev=00:00 obj=unconfined_u:object_r:usr_t:s0 objtype=PARENT
type=CWD msg=audit(05/08/2015 14:07:00.247:1913) : cwd=/var/blog/wp-admin
type=SYSCALL msg=audit(05/08/2015 14:07:00.247:1913) : arch=x86_64 syscall=mkdir success=no exit=-13(Permission denied) a0=0x7fff691d28c0 a1=0777 a2=0x8 a3=0x6e65746e6f632d70 items=2 ppid=13235 pid=13239 auid=unset uid=nginx gid=nginx euid=nginx suid=nginx
fsuid=nginx egid=nginx sgid=nginx fsgid=nginx tty=(none) ses=unset comm=php-fpm exe=/usr/sbin/php-fpm subj=system_u:system_r:httpd_t:s0 key=(null)

=====================

So, what is the wrong?

Thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 需求一个up主付费课程
    • ¥20 模型在y分布之外的数据上预测能力不好如何解决
    • ¥15 processing提取音乐节奏
    • ¥15 gg加速器加速游戏时,提示不是x86架构
    • ¥15 python按要求编写程序
    • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
    • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
    • ¥15 opencv图像处理,需要四个处理结果图
    • ¥15 无线移动边缘计算系统中的系统模型
    • ¥15 深度学习中的画图问题