I have write access to /tmp folder of my shared hosting account at godaddy. I want to move uploaded pictures from /tmp folder to my hosting account folder /home/content/x/y/z/xyz/html/pic/ I am trying to move file through jsp with no success. Folder permissions are set to (read write execute 0777). Godaddy support insists that transfer of file is possible. I am totally stuck and need help in this regard.
When I use linux command(mv/cp) I get below exception:
Process p = Runtime.getRuntime().exec("mv /tmp/"+fileName+" /home/content/x/y/z/xyz/html/pic/ "+fileName);
Error: java.security.AccessControlException: access denied (java.io.FilePermission <> execute)
When I write it through stream I get below exception:
OutputStream bos = new FileOutputStream( "/home/content/x/y/z/xyz/html/pic/"+filename);
bos.write(buffer, 0, bytesRead);
ERROR: java.security.AccessControlException: access denied(java.io.FilePermission/home/content/x/y/z/xyz/html/pic/DSC00061.JPG write