You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by vivri <vi...@gmail.com> on 2010/03/12 06:46:10 UTC
[SOLVED] RE: Tomcat Java permission issue -- cannot write to file
from a webapp.
I have installed Tomcat 6, and the problem(s) went away. Thanks for the time
and for the help, Chuck.
Victor.
vivri wrote:
>
> Thanks for the quick reply, Chuck.
>
> As a quick hack, I moved the records.txt file to my home directory
> (/root/records.txt) and changed the path in my java code as well. Then I
> restarted Tomcat (just to be sure), cleared the cache of my browser and
> tried again - only to find the results unchanged. Did I not understand
> what you meant, or is it something else?
>
> An unrelated, but curiously unsettling phenomenon is that on my dev
> machine, if I quit Tomcat (either by running "catalina.sh stop" or
> "shutdown.sh"), then obviously the page fails to load. On the deployment
> machine, on the other hand, I am able to load the page while Tomcat isn't
> running, and even make changes to the website and see them on a browser. I
> can only guess that this isn't the expected normal behavior... perhaps I
> should reinstall Tomcat? (And upgrade to the newest version, as you've
> recommended.)
>
>
> Victor.
>
>
>
>
> n828cl wrote:
>>
>>> From: vivri [mailto:victor.ivri@gmail.com]
>>> Subject: Tomcat Java permission issue -- cannot write to file from a
>>> webapp.
>>>
>>> My Apache Tomcat version is 5.5, installed on Ubuntu 8.04 through the
>>> aptitude package manager.
>>
>> If you're just starting with Tomcat, then start with the current version
>> - 6.0.26.
>>
>>> I am attempting to log survey responses in a file called "records.txt",
>>> which I keep in the directory of my webapp
>>
>> This is a very bad idea. It's not quite forbidden by the servlet spec,
>> but the container (Tomcat) is not required to provide a webapp with *any*
>> access to the underlying file system (if there is one), other than a
>> scratch area. You should be treating the deployment space of the webapp
>> as read-only, and locate this writable file somewhere outside of the
>> Tomcat directory space. The location can be specified via Java system
>> property, an environment variable, or environment or parameter entries in
>> the webapp deployment descriptor.
>>
>> - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
>
--
View this message in context: http://old.nabble.com/Tomcat-Java-permission-issue----cannot-write-to-file-from-a-webapp.-tp27871316p27873616.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: [SOLVED] RE: Tomcat Java permission issue -- cannot write to
file from a webapp.
Posted by vivri <vi...@gmail.com>.
I got it from the official site
(http://apache.skazkaforyou.com/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz).
I don't believe Ubuntu has 6.0.26 in any of their package repositories. This
is exactly the same version as on my dev machine, and exhibits the same
behavior (with none of the aforementioned problems...).
Victor.
n828cl wrote:
>
>> From: vivri [mailto:victor.ivri@gmail.com]
>> Subject: [SOLVED] RE: Tomcat Java permission issue -- cannot write to
>> file from a webapp.
>>
>> I have installed Tomcat 6, and the problem(s) went away.
>
> From where? I believe that the Ubuntu distribution of Tomcat comes with a
> security manager enabled by default, whereas the real Tomcat from
> tomcat.apache.org does not. Since Ubuntu likes to repackage Tomcat with
> many files shuffled around to non-standard locations and also changes some
> of the default configuration settings, it's not a version that can be
> properly supported on this mailing list.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/Tomcat-Java-permission-issue----cannot-write-to-file-from-a-webapp.-tp27871316p27873720.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: [SOLVED] RE: Tomcat Java permission issue -- cannot write to
file from a webapp.
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: vivri [mailto:victor.ivri@gmail.com]
> Subject: [SOLVED] RE: Tomcat Java permission issue -- cannot write to
> file from a webapp.
>
> I have installed Tomcat 6, and the problem(s) went away.
>From where? I believe that the Ubuntu distribution of Tomcat comes with a security manager enabled by default, whereas the real Tomcat from tomcat.apache.org does not. Since Ubuntu likes to repackage Tomcat with many files shuffled around to non-standard locations and also changes some of the default configuration settings, it's not a version that can be properly supported on this mailing list.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org