Uploaded image for project: 'XNAT'
  1. XNAT
  2. XNAT-6932

Indexing on system path verification error is skipping numbers



    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.4
    • 1.8.4
    • None
    • None
    • XNAT 2021-Q4 Sprint 2
    • Rank:
    • XNAT 2021-Q4 Sprint 2


      To recreate this, you'll need to generate a system path verification error. There may be a better way to do so, but this is what I used:

      1. Create a new directory on XNAT's file system (for example /tmp/inaccessible).
      2. Modify the directory so the tomcat user can't read/modify it (e.g. chmod 000 /tmp/inaccessible).
      3. In XNAT's admin UI (Administer > Site Administration), go to the File System tab.
      4. Set the prearchive and build paths to a nonexistent subdirectory of your inaccessible directory, e.g. /tmp/inaccessible/foo).
      5. Restart tomcat.

      The reason to do the directories like this is that the verification error gets triggered from the path not existing, but we need to prevent XNAT from creating it automatically (hence the inaccessible folder in the path). When you do all this, the XNAT sends an email to the site admin like this:

      The following system path errors have been discovered:
      3. Build path "/tmp/inaccessible/foo" does not exist.
      4. Prearchive path "/tmp/inaccessible/foo" does not exist.

      This is happening because index is now getting incrementing on both lines 118 and 137 of SystemPathVerification.java.

      As for priority, I was first inclined to mark this minor because it should be rather rare for XNAT to send out this type of email, but I decided on major because it might be alarming to the admin. That is, they might think to themselves "Huh, these are errors 3 and 4...what are errors 1 and 2 that it isn't showing me?"




            radiologics_ian Ian Gauthier
            moore.c@wustl.edu Charlie Moore
            0 Vote for this issue
            1 Start watching this issue