linux+php+apache web调用python脚本权限问题
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来设置该文件,但不能彻底解问题,具体解决方案,请看下篇随笔。
最新文章
- 如何在arcmap中调试addin或者插件
- C语言 第三章 基础编程测试与练习
- js数组中indexOf/filter/forEach/map/reduce详解
- 打造H5里的“3D全景漫游”秘籍
- ***git 本地提交后如果让服务器上的GIT 自动更新拉取
- Oracle 经典语法(二)
- iOS经常使用的加密算法
- QWidget可以设置QStyle,它可以绘制很多东西(具体内容没研究,待续)
- 转接口IC GM7122:BT656转CVBS芯片 视频编码电路
- lesson - 13 Linux系统日常管理2
- Linux 基于IPC机制实现进程间的共享内存处理
- Linux进程实践(5) --守护进程
- HBase rest
- Android 手势检测实战 打造支持缩放平移的图片预览效果(下)
- vue内置组件 transition 和 keep-alive 使用
- SpringBoot------自动装配Mapper报错
- Java知多少(103)网络编程之IP地址和InetAddress类
- osg内置shader变量
- 《C++ Primer Plus》12.6 复习各种(类和动态内存分配的)技术 笔记
- Java开发工程师(Web方向) - 01.Java Web开发入门 - 第1章.Web应用开发概述