webvirtmgr
webvirtmgr copied to clipboard
Python 2.7: Insecure key file permissions!
root@ospace:/var/www/webvirtmgr# ./manage.py runserver 0.0.0.0:80
WARNING:root:No local_settings file found.
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 263, in fetch_command
app_name = get_commands()[subcommand]
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 109, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 132, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/var/www/webvirtmgr/webvirtmgr/settings.py", line 165, in <module>
'.secret_key_store'))
File "/var/www/webvirtmgr/webvirtmgr/utils/secret_key.py", line 61, in generate_or_read_from_file
raise FilePermissionError("Insecure key file permissions!")
webvirtmgr.utils.secret_key.FilePermissionError: Insecure key file permissions!
Distro: Ubuntu 14.04 LTS
Check your webvirtmgr/local/.secret_key_store permission must be www-data owner
Hi,
I have the same error for running ./manage.py createsuperuser, problem is i forgot my web gui password and need to either find it in the conf files or add a new user. my webvirtmgr/local/.secret_key_store permission is set to www-data (-rwxr-xr-x 1 www-data www-data) Please help
Permission must be 664
https://github.com/retspen/webvirtmgr/blob/master/webvirtmgr/utils/secret_key.py#L61
Permissions must be 600. See link.