Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run as non-root. /var/log/openbaton Permission Denied! #5

Open
mathiasbrito opened this issue Nov 6, 2018 · 0 comments

Comments

@mathiasbrito
Copy link

The error

When running a VNFM implemented with the SDK, the following error occurs if you run as a regular user:

Traceback (most recent call last):
File "/vagrant/openiotfog-vnfm/oif_vnfm/main.py", line 41, in
main()
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/vagrant/openiotfog-vnfm/oif_vnfm/main.py", line 37, in main
start_vnfm_instances(OIFVNFManager, config_file, 5)
File "/usr/local/lib/python3.5/dist-packages/openbaton/vnfm.py", line 673, in start_vnfm_instances
l = VnfmListener(vnfm_klass, config_file_path, kwargs)
File "/usr/local/lib/python3.5/dist-packages/openbaton/vnfm.py", line 83, in init
os.makedirs(logging_dir)
File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/log/openbaton/'

Process finished with exit code 1

Workaraound

If we create the following directory and give the user permissions to write, the error is gone.

Expected behaviour

If the user have no permission to setup the log in /var/log, the log should be created locally, in the users Home and a warning log message shown to let him know that the log is not in the default location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant