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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记