linux+php+apache web调用python脚本权限问题
2016-01-06 11:34
651 查看
lamp : linux + apache + mysql + php
在近期项目中使用 linux + apache + php调用python脚本是出现以下权限问题:
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1823, in get_resource_filename
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1853, in _extract_resource
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1193, in get_cache_path
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1173, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
Permission denied: '/var/www/.python-eggs'
The Python egg cache directory is currently set to: /var/www/.python-eggs
Perhaps your account does not have write access to this directory? You can change the cache directory by
setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory.
从打印输出来看:没有权限访问'/var/www/.python-eggs'
可以使用chmod来设置该文件,但不能彻底解问题,具体解决方案,请看下篇随笔。
在近期项目中使用 linux + apache + php调用python脚本是出现以下权限问题:
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1823, in get_resource_filename
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1853, in _extract_resource
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1193, in get_cache_path
build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1173, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
Permission denied: '/var/www/.python-eggs'
The Python egg cache directory is currently set to: /var/www/.python-eggs
Perhaps your account does not have write access to this directory? You can change the cache directory by
setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory.
从打印输出来看:没有权限访问'/var/www/.python-eggs'
可以使用chmod来设置该文件,但不能彻底解问题,具体解决方案,请看下篇随笔。
相关文章推荐
- 12月Web服务器份额:Apache与Microsoft均下降
- 如何在 Ubuntu 14/15 上配置 Apache Solr
- [Windows Server 2008] Apache+PHP安全设置
- 五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)
- apache下配置多个虚拟站点
- Apache Tez:一个运行在YARN之上支持DAG作业的计算框架
- php-5.5.30与apache-2.4.18的安装配置
- Apache Commons Lang包比较常用的项目
- 10分钟教会你Apache Shiro
- apache开源项目--dbutils
- apache开源项目--mina
- apache开源项目--OpenMeetings
- apache开源项目--lume
- apache开源项目--Sirona
- apache开源项目--Derby
- apache开源项目--Apache Drill
- apache开源项目-- OODT
- apache开源项目--Mavibot
- apache开源项目--ApacheDS
- Ubuntu 14.04 Web服务器--Apache的安装和配置