Package org.elasticsearch.bootstrap
Class FilePermissionUtils
java.lang.Object
org.elasticsearch.bootstrap.FilePermissionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddDirectoryPath(Permissions policy, String configurationName, Path path, String permissions, boolean recursiveAccessOnly)Add access to path with direct and/or recursive access.static voidaddSingleFilePath(Permissions policy, Path path, String permissions)Add access to single file path
-
Method Details
-
addSingleFilePath
public static void addSingleFilePath(Permissions policy, Path path, String permissions) throws IOExceptionAdd access to single file path- Parameters:
policy- current policy to add permissions topath- the path itselfpermissions- set of file permissions to grant to the path- Throws:
IOException
-
addDirectoryPath
public static void addDirectoryPath(Permissions policy, String configurationName, Path path, String permissions, boolean recursiveAccessOnly) throws IOExceptionAdd access to path with direct and/or recursive access. This also creates the directory if it does not exist.- Parameters:
policy- current policy to add permissions toconfigurationName- the configuration name associated with the path (for error messages only)path- the path itselfpermissions- set of file permissions to grant to the pathrecursiveAccessOnly- indicates if the permission should provide recursive access to files underneath- Throws:
IOException
-