-
Notifications
You must be signed in to change notification settings - Fork 40
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
Give all users read/write permissions for snapshots directory #81
Conversation
I built this installer and tried to install it on my Ubuntu 20 machine which has the issue. I'm not able to make a snapshot but it appears the error may be different at first glance: Running the snapshot repo creation command again yields the same 500 error message: The elasticsearch logs have the same errors: A few things I noticed: The script attempts to restart beaker even though it is already running.
We don't mark the host directory 777 at https://github.com/activecm/BeaKer/blob/master/installer/stage/BeaKer/install_beaker.sh#L181 . I'll try adding a chmod to this line here and giving it another run. |
The changes in the diff above added to this PR worked to get this machine to take a snapshot. |
@Zalgo2462 Looks good, pushed |
@caffeinatedpixel The |
@Zalgo2462 My bad, added as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested well
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.