我的团队使用 virtualenvwrapper 来管理我们项目的 virtualenvs。但是,似乎我们的 hook.log 组权限不断更改为单个用户,而不是保留所有用户拥有的共享组(在我们的例子中,www-data)。有人有这方面的经验吗?
这是我尝试获取 virtualenvwrapper.sh 时遇到的错误:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 83, in main
backupCount=1,
File "/usr/lib/python2.7/logging/handlers.py", line 118, in __init__
BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib/python2.7/logging/handlers.py", line 65, in __init__
logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib/python2.7/logging/__init__.py", line 897, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 24, in _open
rtv = logging.handlers.RotatingFileHandler._open(self)
File "/usr/lib/python2.7/logging/__init__.py", line 916, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/env/hook.log'
virtualenvwrapper.sh: There was a problem running the initialization hooks.