You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/03/28 14:31:38 UTC

[Bug 66545] New: StandardRoot.createMainResourceSet() doesn't report permission issues

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: ebourg@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66545] StandardRoot.createMainResourceSet() doesn't report permission issues

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66545

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Remy Maucherat <re...@apache.org> ---
Maybe we can simply rework the message to mention that this can also be caused
by a permission issue. Normally with a decent hint the user should be able to
figure it out quickly.

Example: "The main resource set specified {0} is not a directory or war file,
or is not readable (does not exist or no permissions to access it)"

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


[Bug 66545] StandardRoot.createMainResourceSet() doesn't report permission issues

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66545

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Remy Maucherat <re...@apache.org> ---
I went in poeditor and changed the english (and french) strings to: "The main
resource set specified [{0}] is not a directory or war file, or is not readable
(it does not exist or permissions to access it are missing)".
I removed the existing translation for other languages.

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