mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
11.24.2006 6e8ad1087a49ce957fc8312e43463f8deeb5177b
opends/src/server/org/opends/server/backends/jeb/RootContainer.java
@@ -146,20 +146,23 @@
                    EnvironmentConfig envConfig) throws DatabaseException
  {
    // Get the backend database backendDirectory permissions and apply
    try
    if(FilePermission.canSetPermissions())
    {
      if(!FilePermission.setPermissions(backendDirectory, backendPermission))
      try
      {
        throw new Exception();
        if(!FilePermission.setPermissions(backendDirectory, backendPermission))
        {
          throw new Exception();
        }
      }
    }
    catch(Exception e)
    {
      // Log an warning that the permissions were not set.
      int msgID = MSGID_JEB_SET_PERMISSIONS_FAILED;
      String message = getMessage(msgID, backendDirectory.getPath());
      logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_WARNING,
               message, msgID);
      catch(Exception e)
      {
        // Log an warning that the permissions were not set.
        int msgID = MSGID_JEB_SET_PERMISSIONS_FAILED;
        String message = getMessage(msgID, backendDirectory.getPath());
        logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_WARNING,
                 message, msgID);
      }
    }
    // Open the database environment
@@ -559,7 +562,8 @@
    FilePermission oldPermission = config.getBackendPermission();
    FilePermission newPermission = newConfig.getBackendPermission();
    if(!FilePermission.toUNIXMode(oldPermission).equals(
    if(FilePermission.canSetPermissions() &&
        !FilePermission.toUNIXMode(oldPermission).equals(
        FilePermission.toUNIXMode(newPermission)))
    {
      try