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

Plugin script to set proper plugin bin dir attributes #14088

Merged

Conversation

javanna
Copy link
Member

@javanna javanna commented Oct 13, 2015

This commit makes sure that the plugin script looks at user, group and permissions of the elasticsearch bin dir and copies them over to the plugin bin subdirectory, whatever they are, so that they get properly setup depending on how elasticsearch was installed. We also make sure that execute permissions are added for files (we already did this before).

Relates to #11016

@javanna
Copy link
Member Author

javanna commented Oct 13, 2015

@jaymode @nik9000 can you have a look? This is the last step to complete the work around #11016.

// add file execute permissions to existing perms, so execution will work.
filePermissions.add(PosixFilePermission.OWNER_EXECUTE);
filePermissions.add(PosixFilePermission.GROUP_EXECUTE);
filePermissions.add(PosixFilePermission.OTHERS_EXECUTE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we wanted the default to be 750 right? If so then we shouldn't set OTHERS_EXECUTE

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what we want to do. I think the original description of the issue doesn't necessarily makes sense for the bin directory. I thought that leaving what we already have shouldn't hurt, especially given that all other scripts that we have under bin (e.g. elasticsearch, plugin) have execute permissions for others too. The change is that we set user and group and we inherit other permissions form the parent dir instead of relying on what we already have on the file and forcing read access (what we did before). I am open to discussion of course :)

@jaymode
Copy link
Member

jaymode commented Oct 14, 2015

LGTM

@javanna javanna force-pushed the enhancement/plugin_bin_dir_permissions branch from a3faa24 to 7df04e6 Compare October 14, 2015 12:26
This commit makes sure that the plugin script looks at user, group and permissions of the elasticsearch bin dir and copies them over to the plugin bin subdirectory, whatever they are, so that they get properly setup depending on how elasticsearch was installed. We also make sure that execute permissions are added for files (we already did this before).

Relates to elastic#11016
Closes elastic#14088
@javanna javanna force-pushed the enhancement/plugin_bin_dir_permissions branch from 7df04e6 to 7368231 Compare October 14, 2015 13:52
@javanna javanna merged commit 7368231 into elastic:master Oct 14, 2015
javanna added a commit that referenced this pull request Oct 14, 2015
This commit makes sure that the plugin script looks at user, group and permissions of the elasticsearch bin dir and copies them over to the plugin bin subdirectory, whatever they are, so that they get properly setup depending on how elasticsearch was installed. We also make sure that execute permissions are added for files (we already did this before).

Relates to #11016
Closes #14088
javanna added a commit that referenced this pull request Oct 14, 2015
This commit makes sure that the plugin script looks at user, group and permissions of the elasticsearch bin dir and copies them over to the plugin bin subdirectory, whatever they are, so that they get properly setup depending on how elasticsearch was installed. We also make sure that execute permissions are added for files (we already did this before).

Relates to #11016
Closes #14088
javanna added a commit that referenced this pull request Oct 14, 2015
This commit makes sure that the plugin script looks at user, group and permissions of the elasticsearch bin dir and copies them over to the plugin bin subdirectory, whatever they are, so that they get properly setup depending on how elasticsearch was installed. We also make sure that execute permissions are added for files (we already did this before).

Relates to #11016
Closes #14088
@clintongormley clintongormley changed the title Plugins: plugin script to set proper plugin bin dir attributes Plugin script to set proper plugin bin dir attributes Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants