Class FilePermissionUtils

java.lang.Object
org.elasticsearch.bootstrap.FilePermissionUtils

public class FilePermissionUtils extends Object
  • Method Details

    • addSingleFilePath

      public static void addSingleFilePath(Permissions policy, Path path, String permissions) throws IOException
      Add access to single file path
      Parameters:
      policy - current policy to add permissions to
      path - the path itself
      permissions - 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 IOException
      Add 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 to
      configurationName - the configuration name associated with the path (for error messages only)
      path - the path itself
      permissions - set of file permissions to grant to the path
      recursiveAccessOnly - indicates if the permission should provide recursive access to files underneath
      Throws:
      IOException