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 2005/12/04 20:33:03 UTC

DO NOT REPLY [Bug 37781] New: - Permission error causes malformed server.xml to be saved.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37781>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37781

           Summary: Permission error causes malformed server.xml to be
                    saved.
           Product: Tomcat 5
           Version: 5.5.9
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Webapps:Administration
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: gsexton@mhsoftware.com


If:

1)you have a context, and the META-INF directory is not writable by the user
tomcat runs as
2)you use the Admin application to change the server configuration 
3)you use the commit changes button

The save will abort, leaving a malformed server.xml and the user will be told
that "changes were saved successfully" (or something similar). In essence, the
write aborts on the host, and closing tags for engines, services, as well as
other hosts are not written.

I think the user needs to be informed that the save failed. In the best case,
write of the server.xml should be atomic so that a malformed server.xml is not
written.

Here is the error log from when it happens:

2005-12-01 14:00:36,843 INFO http-8080-Processor14
org.apache.catalina.storeconfig.StandardContextSF - Store Context  separate with
backup (at file /home/chd/ROOT/META-INF/context.xml.2005-12-01.14-00-36 )
 2005-12-01 14:00:36,844 ERROR http-8080-Processor14
org.apache.catalina.storeconfig.StoreConfig - java.io.FileNotFoundException:
/home/chd/ROOT/META-INF/context.xml.new (Permission denied)
 2005-12-01 14:00:36,844 INFO http-8080-Processor14
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - action:
Debugging -- changes saved to conf/server.xml
 2005-12-01 14:03:26,667 INFO http-8080-Processor6
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - action:
Entered TreeControlTestAction:perform()
 2005-12-01 14:03:26,667 INFO http-8080-Processor6
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - action:
tree param is null
 2005-12-01 14:03:26,667 INFO http-8080-Processor6
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - action:
Select event on Catalina:type=Host,host=calendar.chc1.org
 2005-12-01 14:03:39,512 INFO http-8080-Processor14
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - action:
Entered TreeControlTestAction:perform()
 2005-12-01 14:03:39,512 INFO http-8080-Processor14
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - action:
tree param is null
 2005-12-01 14:03:39,512 INFO http-8080-Processor14
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - action:
Select event on Catalina:type=Service,serviceName=Catalina
 2005-12-01 14:06:02,231 INFO http-8080-Processor9

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org