libhttp2位置为'.cache'

我想设置一个django网站,一个使用oauth2client库,并为此libhttp2。libhttp2位置为'.cache'

似乎一切都工作得很好,在开发独立的服务器,但是当我试图把它挂用的mod_wsgi到Apache时,我不断收到这样一个错误:

[Errno 13] Permission denied: '.cache' 

而这里的回溯:

Traceback: 

File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in get_response

91. request.path_info)

File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py" in resolve

215. for pattern in self.url_patterns:

File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py" in _get_url_patterns

244. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py" in _get_urlconf_module

239. self._urlconf_module = import_module(self.urlconf_name)

File "/usr/lib/pymodules/python2.6/django/utils/importlib.py" in import_module

35. __import__(name)

File "/usr/local/django/prodapps/urls.py" in <module>

5. admin.autodiscover()

File "/usr/lib/pymodules/python2.6/django/contrib/admin/__init__.py" in autodiscover

24. import_module('%s.admin' % app)

File "/usr/lib/pymodules/python2.6/django/utils/importlib.py" in import_module

35. __import__(name)

File "/usr/lib/pymodules/python2.6/django/contrib/auth/admin.py" in <module>

141. admin.site.register(Group, GroupAdmin)

File "/usr/lib/pymodules/python2.6/django/contrib/admin/sites.py" in register

90. validate(admin_class, model)

File "/usr/lib/pymodules/python2.6/django/contrib/admin/validation.py" in validate

20. models.get_apps()

File "/usr/lib/pymodules/python2.6/django/db/models/loading.py" in get_apps

115. self._populate()

File "/usr/lib/pymodules/python2.6/django/db/models/loading.py" in _populate

61. self.load_app(app_name, True)

File "/usr/lib/pymodules/python2.6/django/db/models/loading.py" in load_app

78. models = import_module('.models', app_name)

File "/usr/lib/pymodules/python2.6/django/utils/importlib.py" in import_module

35. __import__(name)

File "/usr/local/django/prodapps/gn/models.py" in <module>

6. from oauth2client.django_orm import CredentialsField, FlowField, Storage

File "/usr/local/lib/python2.6/dist-packages/oauth2client/django_orm.py" in <module>

28. from oauth2client.client import Storage as BaseStorage

File "/usr/local/lib/python2.6/dist-packages/oauth2client/client.py" in <module>

63. CACHED_HTTP = httplib2.Http('.cache')

File "/usr/local/lib/python2.6/dist-packages/httplib2/__init__.py" in __init__

1073. self.cache = FileCache(cache)

File "/usr/local/lib/python2.6/dist-packages/httplib2/__init__.py" in __init__

687. os.makedirs(self.cache)

File "/usr/lib/python2.6/os.py" in makedirs

157. mkdir(name, mode)

Exception Type: OSError at/

Exception Value: [Errno 13] Permission denied: '.cache'

所以,看起来像一个简单的问题 - 找出这个.cache目录所在的位置,并让Web服务器访问它,对吧?

那么,不 - 当我使用devserver时,.cache就在我的树中。但是,apache似乎并不是这种情况?

那么这是什么设置?我如何调整它,或者至少找出它试图创建的位置,以便我可以授予访问权限?

回答:

问题是与Django的的oauth2client代码 - 它有它是否可以用硬编码相对路径访问文件系统,沿着高速缓存目录写得不好的检查:

http://code.google.com/p/google-api-python-client/issues/detail?id=75

以上是 libhttp2位置为'.cache' 的全部内容, 来源链接: utcz.com/qa/257598.html

回到顶部