Unable to create the directory error

后端 未结 5 1181
[愿得一人]
[愿得一人] 2020-12-10 04:34

I created a new subdomain and uploaded the WAR file into its directory, but the server returns following error.

java.io.IOException: Unable to create the dir         


        
相关标签:
5条回答
  • 2020-12-10 05:10

    seems like you need to

    give group full access write to the WAR directory

    sudo chmod 775 /home/jack/public_html/WAR/
    

    then change the group of the directory to tomcat

    chown -R jack:tomcat /home/jack/public_html/WAR/
    
    0 讨论(0)
  • 2020-12-10 05:11

    We need to make sure that Tomcat has permission to fully access the folders. Firstly identify what user or group Tomcat is running in. Next grant that user and/or group ownership. For example the following code will change ownership of directory test folder and everything under it:

    sudo chown -R owner:group /home/blabla/test
    

    This will give the owner and group ownership for executing commands. http://www.computerhope.com/unix/uchown.htm

    Next we use chmod to grant permission which defines the permissions for the owner of the file (the "user"), members of the group who owns the file (the "group")

    http://www.computerhope.com/unix/uchmod.htm

    0 讨论(0)
  • 2020-12-10 05:13

    If permission, user and group are correct. Maybe the answer is selinux.

    0 讨论(0)
  • 2020-12-10 05:33

    0755 is rwxr-xr-x. If you are not the owner of the directory(it is usally user nobody), you cannot write in the directory. You need to be owner of the directory or root to write in that location.

    0 讨论(0)
  • 2020-12-10 05:34

    try:

    sudo chown -R tomcat:tomcat /home/jack/public_html/
    

    probably you shouldn't need to change for the entire public_html, but you can try to see if it works, and then restrict permissions to your desired folder.

    0 讨论(0)
提交回复
热议问题