heritrix 不能运行 You may have to set the ownership of the file

来源:互联网 发布:人工智能如何硬件实现 编辑:程序博客网 时间:2024/06/18 18:05

You may have to set the ownership of the file

\learning\lucence\search\Heritrix\heritrix-1.14.4\heritrix-1.14.4\jmxremote.password

manually to yourself (Administrator) and restrict the access to read-only


当你遇到以上的错误,导致heritrix不能运行的时候,可以试试下面的方法,我用这个方法解决了:

来自于: http://docs.oracle.com/javase/6/docs/technotes/guides/management/security-windows.html


Securing a password file is done differently in the different versions of Windows XP. Solutions for both Windows XP Professional Edition and Windows XP Home Edition are provided in this appendix.

 To Secure a Password File on Windows XP Professional Edition

The procedure given below will not work if you are running Windows XP Home Edition, which does not allow you to change file permissions graphically. A solution is given in To Secure a Password File on Windows XP Home Edition below.


Note - The solution using the cacls command described in To Secure a Password File on Windows XP Home Edition can also be used on Windows XP Professional Edition, as a command-line alternative to using the graphical interfaces.


  1. In Windows Explorer, navigate to the directory containing the jmxremote.password file.
  2. Right-click on the jmxremote.password file and select the Properties option.
    Displaying the jmxremote.password file properties
  3. Select the Security tab
    Displaying the jmxremote.password file's security properties

    If you are using Windows XP Professional Edition and the computer is not part of a domain, then the Security tab will not be automatically visible. To reveal the Security tab, you must perform the following steps.

    1. Open Windows Explorer, and choose Folder Options from the Tools menu.
    2. Select the View tab and scroll to the bottom of the Advanced Settings and clear the Use Simple File Sharing check box.
      Displaying the Security tab in Windows XP.
    3. Click OK to apply the change.
    4. Restart Windows Explorer.

      The Security tab will now be visible

  4. Select the Advanced button in the Security tab.
    Displaying advanced security properties.
  5. Select the Owner tab to check if the file owner matches the user under which the Java VM is running.
    Checking who owns the password file.
  6. Select the Permissions tab to set the permissions.

    If there are permission entries inherited from a parent directory that allow users or groups other than the owner access to the file, then clear the "Inherit from parent the permission entries that apply to child objects" checkbox.


    Blocking inheritance of file permissions from parent objects.
  7. A dialog box will ask if the inherited permissions should be copied from the parent or removed. Press the Copy button.
    Copying permissions from the parent.
  8. Remove all permission entries that grant access to users or groups other than the file owner.

    Do this by clicking the user or group and pressing the Remove button for all users and groups except the file owner.


    Removing permissions from all users but the owner.

    Now there should be a single permission entry which grants Full Control to the owner.

  9. Press OK to apply the file security change.

    The password file is now secure and can only be accessed by the owner.

  10. Press OK in the jmxremote.password Properties dialog.

 To Secure a Password File on Windows XP Home Edition

As stated above, Windows XP Home Edition does not allow you to set file permissions graphically. However, you can set permissions using the cacls command.

  1. Open a command prompt window.
  2. Run the following command
    C:\MyPasswordFile>cacls jmxremote.password

    This command displays the access control list (ACL) of the jmxremote.password file.

  3. Set the access rights so that only your username has read access.

    When no users have been configured on the machine the default username is usually Owner, or a localized translation of Owner.

    C:\MyPasswordFile>cacls jmxremote.password /P Owner:R

    This command grants access to the user Owner with read-only permission, where Owner is the owner of the jmxremote.password file.

  4. Display the ACL again.
    C:\MyPasswordFile>cacls jmxremote.password

    This time, you will see that only the Owner has access to the password file.


    Changing file permissions in Windows XP.

原创粉丝点击