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

Chef solo with --user drops permissions after it has created artifacts #8360

Closed
btm opened this Issue Apr 11, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@btm
Copy link
Member

btm commented Apr 11, 2019

Description

When using chef-solo --user foo --recipe-url the cache directory (and others) has to be preconfigured to be owned by 'foo'.

Chef Version

14.11.21

Platform Version

Ubuntu Linux 18.04.2

Replication Case

from @teknofire:

create /tmp/solo.rb:

file_cache_path "/tmp/chef-solo/cache/"
file_backup_path "/tmp/chef-solo/backup/"
cookbook_path "/tmp/chef-solo/recipes/cookbooks/"
log_level :info

then run:

chef-solo --format doc --recipe-url https://github.com/teknofire/chef-solo-test/releases/download/v1.0/chef-solo.tar.gz --user opscode --override-runlist 'recipe[testing]' --config /tmp/solo.rb 

Client Output

[2019-04-11T16:48:57-04:00] INFO: About to change privilege to opscode
[2019-04-11T16:48:57-04:00] INFO: Started chef-zero at chefzero://localhost:1 with repository at /tmp/chef-solo/recipes
  One version per cookbook

[2019-04-11T16:48:57-04:00] FATAL: Errno::EACCES: Permission denied @ dir_s_mkdir - /tmp/chef-solo/cache

btm added a commit that referenced this issue Apr 11, 2019

Drop privileges before creating files in solo mode
Fixes #8360

Signed-off-by: Bryan McLellan <btm@loftninjas.org>

@tas50 tas50 added Type: Bug and removed Status: Untriaged labels Apr 11, 2019

@tas50 tas50 closed this in #8361 Apr 15, 2019

btm added a commit that referenced this issue Apr 15, 2019

Drop privileges before creating files in solo mode
Fixes #8360

Signed-off-by: Bryan McLellan <btm@loftninjas.org>

bobchaos pushed a commit to cc-build/chef that referenced this issue Apr 19, 2019

Drop privileges before creating files in solo mode
Fixes chef#8360

Signed-off-by: Bryan McLellan <btm@loftninjas.org>

bobchaos pushed a commit to cc-build/chef that referenced this issue Apr 19, 2019

Drop privileges before creating files in solo mode
Fixes chef#8360

Signed-off-by: Bryan McLellan <btm@loftninjas.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.