I have faced strange poblem while writing Grails application deployed on Tomcat.
After creating simple test controller I want to write test contents in package com
Ensure you that you have read and execute access to all parent directories as well.
Example:
chmod o+x /home/user
I'm use virtual box 6.1 and macOS Catalina 10.15.5.
In my case I need to add -R
flag.
chmod -R o+x /home/user
I ran into this problem during builds within a Jenkins job. I had added the jenkins
user to the tomcat7
group, yet the Jenkins job failed whenever it was supposed to copy artifacts to the Tomcat instance directory.
It turned out all I needed to fix this problem was to restart the Jenkins service.
FileNotFoundException occurs:
when a file with the specified pathname does not exist. It will also be thrown if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.
File is there and it has write rights according to what you sent.
In some cases, if the file that you are trying to access for read/write operation is opened by another program then this error will occur. Use lsof | grep the-file-name.txt
to see if it is open.
Finally I have solved the problem. One of the directory in path haven't executable permission for other group, so as @JustinKSU suggested, there was no possibility to go throught whole path.
chmod o+x /home/user
solved the problem.
Same symptoms when you have selinux
activated
You can check the status with sestatus
and disable it with setenforce 0
It may solve your problem in the short term, just make sure it's reboot proof.