Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.4.1.Final
    • Fix Version/s: None
    • Component/s: Common
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. Create any backup,
      2. Try to restore it with the REST endpoint
        • Should be working. If not, fix that first.
      3. chmod -w /path/to/backup
      4. Try to restore it with the REST endpoint
        • Expected: works
        • Actual: Backup cannot be found
      Show
      Create any backup, Try to restore it with the REST endpoint Should be working. If not, fix that first. chmod -w /path/to/backup Try to restore it with the REST endpoint Expected: works Actual: Backup cannot be found

      Description

      I took a look at the source, all candidate directories for the backup are sent through the org.modeshape.web.jcr.rest.handler.RestRepositoryHandler.isValidDir function:

          private boolean isValidDir( String dir ) {
              if (StringUtil.isBlank(dir)) {
                  return false;
              }
              File dirFile = new File(dir);
              return dirFile.exists() && dirFile.canWrite() && dirFile.isDirectory();
          }
      

      As you can see, the directory is being checked for writability.
      Since ModeShape is supposed to restore (i.e. read) that backup, I don't see why it would need write permissions to do that.

      The error message is misleading, too, since it says the backup cannot be found, not that write permissions were missing.

      My expectation here is that at least the error message is fixed.
      But if ModeShape indeed never writes anything into the backup directory, then it should not require the backup directory to be writable.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tomylobo Tomy Lobo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: