Hi,

I have a servlet, Servlet-A, that rename a file from /tmp/oldFile to 
/someDirectory/newFile. The Servlet-A runs fine when it runs by itself in a Red 
Hat Linux 7.2 server that has jakarta-tomcat-4.1.30 running. However, it false 
to rename the /tmp/oldFile to /someDirectory/newFile when the Servlet-A run 
(within the jakarta-tomcat-4.1.30) in a Red Hat Linux 7.2 server box that also 
has jboss-3.2.1_tomcat-4.1.24 running. I thought it may be privilege issue so I 
set the /someDirectory directory with “chmod –R 777” and run Tomcat as a 
root user. But, it is still false to rename the /tmp/oldFile file to the 
/someDirectory/newFile. 

The strange thing is that the Servlet-A was able to write the oldFile to the 
/tmp directory but can not rename the oldFile to the /someDirectory directory 
that was allowed for writing for ALL user levels. Can this be Jboss prevented 
the rename operation. I used the canRead and canWrite to check allowable action 
by the File. It turns out that the Servlet-A can read and write the /tmp/ 
oldFile. But the Servlet-A can’t read or write the /someDirectory/newFile.  

The strangest thing is that when the Servlet-A runs in a Red Hat Linux 7.2 
server that has ONLY jakarta-tomcat-4.1.30 running, the condition of canRead 
and canwrite are the same. Meaning that the Servlet-A was able to read, and 
write the oldFile. But can’t read, and write the newFile. However, the 
renameTo() method returned true and the Servlet-A was able to rename the 
/tmp/oldFile into /someDirectory/newFile.  

Any help in this issue is greatly appreciated.

Kam

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to