I'm wondering if anyone has seen a problem with file sharing in Tomcat (on Windows) to a network drive (mapped drive). I'm almost positive it has to do with permissions, but I've exhausted my knowledge.
Writing a simple Java program (completely outside Tomcat) to write to a file on a mapped drive (i.e., U:\file.txt) works fine, proving that the syntax is correct. Copying the exact same code snippet into a Java bean invoked by my Tomcat app yields a FileNotFoundException. In addition, Tomcat displays sort of an odd message in the browser, listing the jsp page that tries to display a list of attachments (that I was just adding a file to), and saying "access is denied" but pointing to the jsp page servlet (i.e., ..\work\..page_jsp.java), not to the mapped network drive. This may be a clue, but I'm assuming the access denied is coming from trying to write the file to the network drive as the error goes away when I remove the code snippet. Here's another oddness: this code works fine on Windows 2000. The exact same code breaks on Windows XP and Windows 2003 Server. Meaning on Windows 2000, Tomcat writes files to the mapped network drive just fine. So I walk down the permissions path: Tomcat is running as a service and is being run not as localSystem but as a special Tomcat user on my Windows AD Domain; the mapped network drive was mapped AS that same user (my U: drive), and the permissions on the share and all subdirectories give full permission to that same Tomcat user. In fact I just opened it up to "everyone" to see if that helped, and it did not. I don't *think* it's a catalina.policy issue, because as far as I know I'm not invoking Tomcat with the -security option, but I don't fully understand this and I'm certainly open to the possibility that I need to add a security permission within Tomcat. If this is the case, I'd appreciate a pointer to how to do this. Also open to better ways to do this, besides putting document attachments uploaded by the user in the database. I read about jCIFS and am considering using it. Any thoughts? Thanks much. Andrew Longley --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
