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-deniedhttp://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
时间: 2024-10-14 10:23:23