sous-chefs / redisio

Development repository for the redisio cookbook
https://supermarket.chef.io/cookbooks/redisio
Apache License 2.0
297 stars 301 forks source link

WARNING: Sentinel was not able to save the new configuration on disk!!!: Permission denied #450

Closed zedtux closed 2 years ago

zedtux commented 2 years ago

:speaking_head: Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

:ghost: Brief Description

With the latest Redis version at least (6.2.6), when running this cookbook, I have 2 warning messages:

Could not create tmp config file (Permission denied)
WARNING: Sentinel was not able to save the new configuration on disk!!!: Permission denied

:pancakes: Cookbook version

6.1.0

:woman_cook: Chef-Infra Version

17.9.26

:tophat: Platform details

Ubuntu 20.04

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

:police_car: Expected behavior

The cookbook should set permissions of the /etc/redis directory so that the redis user is allowed to write on files.

:heavy_plus_sign: Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

zedtux commented 2 years ago

To me the issue is in the block of code creating the configuration directory which doesn't sets the group to redis (at least for Ubuntu, probably Debian too), and it sets the permissions to 755 which doesn't allow redis user to write: it should be 775.

ramereth commented 2 years ago

@zedtux please feel free to create a PR which fixes this.