juergh / dwarf

OpenStack API on top of libvirt/kvm
Apache License 2.0
35 stars 9 forks source link

dwarf-manage gives permission denied error when run as non-root #5

Open tpot opened 9 years ago

tpot commented 9 years ago

Should there be a better error message here?

debian@dwarf:~$ dwarf-manage db-dump Traceback (most recent call last): File "/usr/bin/dwarf-manage", line 102, in level=logging.DEBUG) File "/usr/lib/python2.7/logging/init.py", line 1540, in basicConfig hdlr = FileHandler(filename, mode) File "/usr/lib/python2.7/logging/init.py", line 911, in init StreamHandler.init(self, self._open()) File "/usr/lib/python2.7/logging/init.py", line 936, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 13] Permission denied: '/var/lib/dwarf/dwarf.log’

Maybe default logging to stdout with a warning saying that the log file couldn't be written to. I guess it depends on the permissions on the database file whether running db-dump as non-root even makes sense.