reset password
Author Message
ashasabeer
Posts: 55
Posted 18:45 Oct 09, 2010 |

When i tried to do "Upload file function" in CS3 server for Hw2,

i am getting below error.

javax.servlet.ServletException: java.io.FileNotFoundException: /var/lib/tomcat6/webapps/cs520stu06/WEB-INF/files/hw2.txt (Permission denied)
cs520.fileupload.FileUploadHandler.doPost(FileUploadHandler.java:64)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

My program is working fine in my local system.

Is there any permission issue in server?

Thanks

 

 


 

cysun
Posts: 2935
Posted 19:31 Oct 09, 2010 |

You need to change the permission of the files folders to rwxrwxrwx; otherwise the tomcat server won't be able to write to it.

To change the permission, either log onto the server and do a "chmod 777 files", or in WinSCP, right click on the files folder, select Properties, then check R, W, and X for Group and Other.

ashasabeer
Posts: 55
Posted 21:50 Oct 09, 2010 |

Thank you, Professor.