[[ともっくす alloc] init]

ともっくすの雑多な日記と技術的なメモ

ApacheでPyramidを動かそうと思ったら Python egg cache がどうのって怒られた

Apacheの環境を構築して,ローカルで開発していたPyramidプロジェクトをサーバ上に持って行って,いざ動かそうとしたら,Python egg cache がどうのこうのって怒られたことがあった.

The following error occurred while trying to extract file(s) to the Python egg cache:

  [Errno 13] 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.


パーミッションがないと怒られているので,パーミッションを設定しつつ,python-eggの設定をする.

/etc/httpd/conf.d/mod_wsgi.confに以下を追記.

WSGIPythonEggs /var/www/.python-eggs


で,.python-eggsディレクトリを作り,パーミッションapacheに設定する.

$ mkdir /var/www/.python-eggs
$ chown apache:apache /var/www/.python-eggs

(スーパーユーザじゃないならsudoが必要)