Quickstart and permissions
I was just following the quickstart from the readme with the prebuilt docker image.
$ ./scripts/run-container sites/example /foo/bar
marv-robotics
marv-robotics
Traceback (most recent call last):
File "/opt/marv/bin/marv", line 11, in <module>
sys.exit(cli())
File "/opt/marv/local/lib/python2.7/site-packages/marv_cli/__init__.py", line 118, in cli
marv(auto_envvar_prefix='MARV')
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/opt/marv/local/lib/python2.7/site-packages/marv/cli.py", line 244, in marvcli_init
create_app(init=True)
File "/opt/marv/local/lib/python2.7/site-packages/marv/cli.py", line 53, in create_app
app = marv.app.create_app(site, checkdb=not init)
File "/opt/marv/local/lib/python2.7/site-packages/marv/app/__init__.py", line 30, in create_app
os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o666)
OSError: [Errno 13] Permission denied: '/home/marv/site/sessionkey'
I guess the issue is that sites/example
is not writable by user with id 1000
, which is the case for our lab setup with ldap users. A workaround is chmod -R a+w sites/example/
, but that is maybe not ideal.
Not sure what the best workflow is here... What we did in the past was changing the user id of the marv user on container startup to match the user id on the host.