标签:
1,使用python调用os.mkdir无文件创建权限:
chcon -R -t httpd_sys_content_t /path/to/www chcon -R -t httpd_sys_content_rw_t /path/to/www/dir/for/rw
参考资料:
http://stackoverflow.com/questions/28856148/centos-7-apache-php-mkdir-permission-denied
http://serverfault.com/questions/626610/selinux-preventing-apache-from-writing-to-a-file
2,调用urllib2.urlopen()无调用权限[Errno 13] Permission denied:
命令行调用:setenforce 0
或者修改配置文件:/etc/selinux/config 设置:SELINUX=“disabled”
参考资料:http://www.cnblogs.com/javawebsoa/p/3241092.html
标签:
原文地址:http://www.cnblogs.com/doublehappyi/p/4760803.html