This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Description
I use vim to edit system files etc, under root and also for user specific settings under a user account. If root is the first user of vim since booting, the log file (vim-rtags-python.log) is created with ownership root:root with permissions 644, so subsequent use as the user account creates an error
Error detected while processing function rtags#InitPython: line 7: Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/paul/.vim/plugged/vim-rtags/plugin/vimrtags.py", line 11, in <module> logging.basicConfig(filename='%s/vim-rtags-python.log' % tempdir,level=logging.DEBUG) File "/usr/lib/python3.7/logging/__init__.py", line 1898, in basicConfig h = FileHandler(filename, mode) File "/usr/lib/python3.7/logging/__init__.py", line 1087, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python3.7/logging/__init__.py", line 1116, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) PermissionError: [Errno 13] Permission denied: '/tmp/vim-rtags-python.log' Press ENTER or type command to continue
Possible solutions:
- Create the logfile with more open permissions
- Create a logfile on a per-user basis
- Allow the logfile location to be specified in the configuration (perhaps via an environment variable)
- Allow the logfile to be disabled - not created and not used - again specificed in the configuration.
- Make the logfile name unique based on the process id (or some other distinguishing feature)