Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow chef-solo to run as non-root user #153

Open
tbe opened this issue Apr 20, 2018 · 0 comments
Open

Allow chef-solo to run as non-root user #153

tbe opened this issue Apr 20, 2018 · 0 comments

Comments

@tbe
Copy link
Contributor

tbe commented Apr 20, 2018

Chef allows to be run as non-root user [1].

But currently, dokken does not allow such a scenario for testing.

The sandbox directories are created with mode 0755
https://github.com/someara/kitchen-dokken/blob/e154ab66c3a375d6d82fa970d3c41c0f77e0a601/lib/kitchen/helpers.rb#L124

If the user within the container is not root and has a different uid then the user on the host, chef-client run fails with:

[2018-04-20T13:30:58+00:00] FATAL: Errno::EACCES: Permission denied @ rb_sysopen - /opt/kitchen/cache/chef-client-running.pid
[2018-04-20T13:30:58+00:00] FATAL: Errno::EACCES: Permission denied @ rb_sysopen - /opt/kitchen/cache/chef-client-running.pid

It would be great if mode for this directories could be changed from the kitchen configuration, to allow such scenarios.

[1] https://docs.chef.io/ctl_chef_client.html#run-as-non-root-user

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants