When on my Linux machine using tomcat for a java web application and I run an application from tomcat, the server did not able to create a folder inside another folder in my home like home/manusingh/webbee/ through the application.
I was writing a command on terminal like-
[root@localhost manusingh]# chmod -R 755 webbee2 [root@localhost manusingh]# chown -R nobody.nobody webbee2
netsuiteCredentials.HOME_PATH=/home/manusingh/webbee2/
//java code trying to create file on machine
File hmsFolder =new File(netsuiteCredentials.HOME_PATH+"HMS"); if(!hmsFolder.exists()) {
System.out.println("hms folder not exists");
hmsFolder.mkdirs();
}
File credentialsFolder =new File(netsuiteCredentials.HOME_PATH+"credentials");
if(!credentialsFolder.exists()) {
System.out.println("credential folder not exists");
credentialsFolder.mkdirs();
}