Public bug reported: When virutalenvwrapper is installed and you open a new a sudo shell the file hook.log is owned by root but located in the user's home.
ls -la .virtualenvs/ insgesamt 72 drwxr-xr-x 2 stephan stephan 4096 2011-10-06 23:56 . drwxr-xr-x 121 stephan stephan 12288 2011-10-07 17:55 .. -rwxrwxr-x 1 stephan stephan 106 2011-08-25 02:01 get_env_details -rw-r--r-- 1 root root 1160 2011-10-07 15:10 hook.log -rw-r--r-- 1 stephan stephan 10208 2011-10-06 23:56 hook.log.1 -rwxrwxr-x 1 stephan stephan 92 2011-08-25 02:01 initialize -rwxrwxr-x 1 stephan stephan 69 2011-08-25 02:01 postactivate -rwxrwxr-x 1 stephan stephan 71 2011-08-25 02:01 postdeactivate -rwxrwxr-x 1 stephan stephan 69 2011-08-25 02:01 postmkvirtualenv -rwxrwxr-x 1 stephan stephan 63 2011-08-25 02:01 postrmvirtualenv -rwxrwxr-x 1 stephan stephan 70 2011-08-25 02:01 preactivate -rwxrwxr-x 1 stephan stephan 72 2011-08-25 02:01 predeactivate -rwxrwxr-x 1 stephan stephan 94 2011-08-25 02:01 premkvirtualenv -rwxrwxr-x 1 stephan stephan 64 2011-08-25 02:01 prermvirtualenv This causes an error message like this Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/pymodules/python2.7/virtualenvwrapper/hook_loader.py", line 72, 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 893, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python2.7/logging/__init__.py", line 912, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 13] Permission denied: '/home/stephan/.virtualenvs/hook.log' virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly. Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/pymodules/python2.7/virtualenvwrapper/hook_loader.py", line 72, 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 893, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python2.7/logging/__init__.py", line 912, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 13] Permission denied: '/home/stephan/.virtualenvs/hook.log' virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly. ProblemType: Bug DistroRelease: Ubuntu 11.10 Package: virtualenvwrapper 2.7.1-1 ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4 Uname: Linux 3.0.0-12-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 1.23-0ubuntu2 Architecture: amd64 Date: Fri Oct 7 17:56:48 2011 InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Beta 1 amd64 (20110329.1) PackageArchitecture: all ProcEnviron: LANGUAGE=de_DE LANG=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 SHELL=/bin/bash SourcePackage: virtualenvwrapper UpgradeStatus: Upgraded to oneiric on 2011-06-23 (106 days ago) ** Affects: virtualenvwrapper (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug oneiric -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/870097 Title: Using sudo with virtualenvwrapper causes $HOME/.virtualenvs/hook.log to have have wrong acces rights To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/virtualenvwrapper/+bug/870097/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs