https://bz.apache.org/bugzilla/show_bug.cgi?id=66545

            Bug ID: 66545
           Summary: StandardRoot.createMainResourceSet() doesn't report
                    permission issues
           Product: Tomcat 9
           Version: 9.0.73
          Hardware: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: ebo...@apache.org
  Target Milestone: -----

StandardRoot.createMainResourceSet() throws an IllegalArgumentException if
docBase neither points to a directory or a war file. The error message is "The
main resource set specified {0} is not valid". This exception can also be
thrown when docBase exists but the Tomcat process lacks the permissions to
access it. In this case the error message isn't really helpful.

I suggest checking the permissions first (with File.canRead() for example) and
throwing an exception with an explicit message stating that Tomcat lacks the
permissions to read the file/directory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to