[Python] django部署到apache之后文件上传 [Errno 13] Permission denied


解决方法
修改文件夹uoload用户组为apache的用户组daemon, 属性是 -R 755
[root@VMServer blog]# pwd
/var/www/blog

[root@VMServer fileManage]#ls -ltr
total 24
-rwxr-xr-x 1 root root  252 Mar 22 11:11 manage.py
drwxr-xr-x 6 root root 4096 Mar 22 11:11 static
drwxr-xr-x 2 root root 4096 Mar 22 11:11 templates
drwxr-xr-x 3 root root 4096 Mar 23 08:25 untitled1
drwxr-xr-x 4 root root 4096 Mar 23 09:58 upload
drwxrwxr-x 2 root root 4096 Mar 23 10:06 uoload
[root@VMServer fileManage]# chgrp daemon uoload
[root@VMServer fileManage]# ls -ltr
total 24
-rwxr-xr-x 1 root root    252 Mar 22 11:11 manage.py
drwxr-xr-x 6 root root   4096 Mar 22 11:11 static
drwxr-xr-x 2 root root   4096 Mar 22 11:11 templates
drwxr-xr-x 3 root root   4096 Mar 23 08:25 untitled1
drwxr-xr-x 4 root root   4096 Mar 23 09:58 upload
drwxrwxr-x 2 root daemon 4096 Mar 23 10:06 uoload
[root@VMServer fileManage]# 

属性是 755
[root@VMServer fileManage]# chmod g+w uoload


参考
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 深蓝海洋 设计师:CSDN官方博客 返回首页