Can Anyone Check This Link
Hello,
Pls check this link,
Custom Directory Creation On Server
The thing deployed application does is, it allows the user of the web-app to create a folder on the server with a name of his/her choice and upload his/her files into that folder. Here is what I am getting as Exception
Caught Exception: java.security.AccessControlException: access denied (java.io.FilePermission /var/chroot/home/content/b/r/i/bringlifeto/html/MyDemoDirApp/demodir/testdir write)
Can any body explain me this issue and provide me a correct way to implement it.
Re: Can Anyone Check This Link
Its because the application server (tomcat, jboss or whatever) you are using is run as a certain user on the operating system. This user does not have access to write anything to the folder specified as /var/chroot/home/content/b/r/i/bringlifeto/html/MyDemoDirApp/demodir/testdir
To solve this problem you need to make sure that the user you start your application server as has write access to the folder in question by using chmod or chown.
// Json
1 Attachment(s)
Re: Can Anyone Check This Link
Dear JSon,
Thanks for replying. We are having an Hosting account with GoDaddy Server(A Shared Server). Which is based on Linux Server and Apache Tomcat 5.x. I changed permission to the deployed web-app to write via Control Panel then also I am getting the same exception. But everthing works fine on Windows locally.
Attaching my code for your reference.
I don't know what to do?What documents to refer.
Please Help
Regards,
Arpit U. Gadle
Re: Can Anyone Check This Link
I don't think there is anything in your code that you can do to change this, you need to figure what user is running tomcat and then make sure that user can write to your directories.
// Json
Re: Can Anyone Check This Link
Is there anything which i can use in my code to change the permission of the directory.
Re: Can Anyone Check This Link
Not that I'm aware of.
Maybe you could call a command line command like chmod or something.
// Json