python - Apache 显示权限被拒绝:flask_session 错误
问题描述
我试图让烧瓶与虚拟环境和 wsgi 配置为工作但 Apache 不断给我这个错误:
[2018 年 11 月 13 日星期二 13:23:55.179153] [wsgi:error] [pid 11819] [xxxx:xxxx] app.session_interface = self._get_interface(app)
[2018 年 11 月 13 日星期二 13:23:55.179160] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/var/www/html/project/python/lib/python3.6/site-packages/flask_session/ init .py”,第 93 行,在 _get_interface 中
[2018 年 11 月 13 日星期二 13:23:55.179163] [wsgi:error] [pid 11819] [xxxx:xxxx] config['SESSION_USE_SIGNER'], config['SESSION_PERMANENT'])
[2018 年 11 月 13 日星期二 13:23:55.179169] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/var/www/html/project/python/lib/python3.6/site-packages/flask_session/ session.py”,第 314 行,在init中
[2018 年 11 月 13 日星期二 13:23:55.179172] [wsgi:error] [pid 11819] [xxxx:xxxx] self.cache = FileSystemCache(cache_dir, threshold=threshold, mode=mode)
[2018 年 11 月 13 日星期二 13:23:55.179177] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/var/www/html/project/python/lib/python3.6/site-packages/werkzeug/ contrib/cache.py”,第 717 行,在init中
[2018 年 11 月 13 日星期二 13:23:55.179180] [wsgi:error] [pid 11819] [xxxx:xxxx] os.makedirs(self._path)
[2018 年 11 月 13 日星期二 13:23:55.179185] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/lib64/python3.6/os.py”,第 220 行,在 makedirs
[2018 年 11 月 13 日星期二 13:23:55.179188] [wsgi:error] [pid 11819] [xxxx:xxxx] mkdir(name, mode)
[2018 年 11 月 13 日星期二 13:23:55.179215] [wsgi:error] [pid 11819] [xxxx:xxxx] PermissionError: [Errno 13] Permission denied: '/flask_session'
我尝试给项目不同的权限,但没有任何效果
解决方案
您应该指定要使用的会话接口类型。
尝试将 设置SESSION-TYPE
为"null"
。
推荐阅读
- node.js - winston.debug 在终端上不显示任何内容
- java - 无法在 py4j 中从 Python 启动网关
- javascript - 如何处理以快递方式发送到服务器的数据?
- mysql - MySQL ORDER BY 来自同一多个表的多个列
- memory-management - 关于与数据结构相关的地址和参数
- asp.net-core-mvc - Linux 部署上的 ASP.NET 核心样式
- basic - 文本上的附加彩色行
- javascript - 我正在尝试获得特定时期的总利息
- javascript - 无法访问捆绑到同一个 Browserify 包中的模块之间的功能?
- java - Beam Java SDK 2.4/2.5 PAssert 与 CoGroupByKey