We just started using chef-workstation ( Download Chef Workstation | Chef ). In our scenario, For example one of the user (USERA) tried to perform (rspec) "chefspec test" on application cookbook, it will generate few files under /tmp/chef/cache/cookbook/xxxx with the permission of USERA and the test is also passing. At the same time, when USERB tried to perform "chefspec test" for the same applicatio in the same server, it throwing "permission" denied like below
/home/USERB/.chef/gem/ruby/3.0.0/gems/chef-16.18.0/lib/chef/digester.rb:64 in 'initialize': Permission denied @ rb_sysopen - /tmp/chef/cache/cookbooks/application/Makefile
while checking permissions, noticed that /tmp/chef/cache/cookbooks/application/Makefile having 600 permission which could only be accessible by USERA and for USERB it getting permissioned denied error.
USERB@Server$ls -ld /tmp/chef/cache/cookbooks/application/Makefile
-rw------- 1 USERA USERA /tmp/chef/cache/cookbooks/application/Makefile
USERB@Server$cat /tmp/chef/cache/cookbooks/application/Makefile
cat /tmp/chef/cache/cookbooks/application/Makefile: Permission denied
So, What should be the correct way to fix the issue ? Does there is any refactoring required for chef-workstation package or in our application to access the files with other user permission