Skip to content

Commit

Permalink
Adding permissions for extensions directory (#6561)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarat Vemulapalli <[email protected]>
  • Loading branch information
saratvemulapalli authored Mar 7, 2023
1 parent a25f974 commit 9a763e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server/src/main/java/org/opensearch/bootstrap/Security.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.io.PathUtils;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.util.FeatureFlags;
import org.opensearch.env.Environment;
import org.opensearch.http.HttpTransportSettings;
import org.opensearch.plugins.PluginInfo;
Expand Down Expand Up @@ -317,9 +316,7 @@ static void addFilePermissions(Permissions policy, Environment environment) thro
addDirectoryPath(policy, Environment.PATH_HOME_SETTING.getKey(), environment.libDir(), "read,readlink", false);
addDirectoryPath(policy, Environment.PATH_HOME_SETTING.getKey(), environment.modulesDir(), "read,readlink", false);
addDirectoryPath(policy, Environment.PATH_HOME_SETTING.getKey(), environment.pluginsDir(), "read,readlink", false);
if (FeatureFlags.isEnabled(FeatureFlags.EXTENSIONS)) {
addDirectoryPath(policy, Environment.PATH_HOME_SETTING.getKey(), environment.extensionDir(), "read,readlink", false);
}
addDirectoryPath(policy, Environment.PATH_HOME_SETTING.getKey(), environment.extensionDir(), "read,readlink", false);
addDirectoryPath(policy, "path.conf'", environment.configDir(), "read,readlink", false);
// read-write dirs
addDirectoryPath(policy, "java.io.tmpdir", environment.tmpDir(), "read,readlink,write,delete", false);
Expand Down

0 comments on commit 9a763e8

Please sign in to comment.