Re: Unable to access dir on network from GWt app
It may help to try to deploy in a fresh install of Tomcat (downloaded from apache, the bin distribution) executed with root. Most Tomcat distributions (specially the one from Debian) are configured for production mode. It may be really secure, but it's a nightmare for programmers. Once you have it running you can try to look for the differences in the setup and experiment a bit. On Jun 8, 12:33 pm, Lothar Kimmeringer wrote: > SC schrieb: > > > I am running a GWT application on a tomcat container on a linux > > server. In one part of the code on the server side, I am trying to > > search for some files within a directory structure which is on the > > network . > > [...] > > > I don't get any errors or exceptions from the File class object in > > Java saying access denied. > > File isn't accessing the file but is the representation of a > file in a file system allowing you to query informations about > it, like the ability to read etc. > > > However when I debug and run fileObject.canRead() and > > fileObject.canWrite it returns false. > > So trying to open a FileInputStream or FileOutputStream > will throw an IOException. > > > I cannot query the dir structure > > to look for the file through the application when running onlinux. The > > directory and the sub dirs have the correct permissions on them. > > > Could this be a GwT running on tomcat and linux issue? > > No. Most likely Tomcat is running as a unprivileged user (like > nobody) or installed a SecurityManager preventing you from > accessing parts of the file-system outside the sandbox. > > Regards, Lothar -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Unable to access dir on network from GWt app
Okay thanks . On Jun 8, 11:33 am, Lothar Kimmeringer wrote: > SC schrieb: > > > I am running a GWT application on a tomcat container on a linux > > server. In one part of the code on the server side, I am trying to > > search for some files within a directory structure which is on the > > network . > > [...] > > > I don't get any errors or exceptions from the File class object in > > Java saying access denied. > > File isn't accessing the file but is the representation of a > file in a file system allowing you to query informations about > it, like the ability to read etc. > > > However when I debug and run fileObject.canRead() and > > fileObject.canWrite it returns false. > > So trying to open a FileInputStream or FileOutputStream > will throw an IOException. > > > I cannot query the dir structure > > to look for the file through the application when running onlinux. The > > directory and the sub dirs have the correct permissions on them. > > > Could this be a GwT running on tomcat and linux issue? > > No. Most likely Tomcat is running as a unprivileged user (like > nobody) or installed a SecurityManager preventing you from > accessing parts of the file-system outside the sandbox. > > Regards, Lothar -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Unable to access dir on network from GWt app
SC schrieb: > I am running a GWT application on a tomcat container on a linux > server. In one part of the code on the server side, I am trying to > search for some files within a directory structure which is on the > network . [...] > I don't get any errors or exceptions from the File class object in > Java saying access denied. File isn't accessing the file but is the representation of a file in a file system allowing you to query informations about it, like the ability to read etc. > However when I debug and run fileObject.canRead() and > fileObject.canWrite it returns false. So trying to open a FileInputStream or FileOutputStream will throw an IOException. > I cannot query the dir structure > to look for the file through the application when running onlinux. The > directory and the sub dirs have the correct permissions on them. > > Could this be a GwT running on tomcat and linux issue? No. Most likely Tomcat is running as a unprivileged user (like nobody) or installed a SecurityManager preventing you from accessing parts of the file-system outside the sandbox. Regards, Lothar -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.