Give all users read/write permissions for snapshots directory #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #80
In order to resolve the missing permissions on the snapshots directory for some BeaKer installs, the directory is given read/write permissions for all users. This shouldn't be an issue since the
/opt/BeaKer
directory requires admin/sudo access.Testing:
I tried to replicate the issue on Ubuntu 20.04 with a fresh v0.0.13 BeaKer install and applying the current installer over it for ELK v7.17.9 and v8.7.0. I did not run into the failing snapshot creation during the upgrade. After the upgrade completed, manually created a snapshot via the snapshot API and was able to do so. I exec'd into the elasticsearch container and noted that the owner of the snapshots directory was
elasticsearch:root
, and was able to write to that directory viaecho "test" > test
. The/opt/BeaKer/snapshots
folder was owned bynaomi:root
. Creating a file in/opt/BeaKer/snapshots
created a file in/usr/share/elasticsearch/snapshots
within the container. After runningbeaker down
andbeaker up -d
, the permissions stayed the same.I repeated the steps on CentOS 7 ( selinux mode permissive) with the same results.
I tested this PR using the same steps listed above on Ubuntu 20.04. Since the folder ownership change was removed, the owner is now
root:root
for both/opt/BeaKer/snapshots
and/usr/share/elasticsearch/snapshots
on the container. In my case, snapshot creation continues to succeed.