Asking about the permission inherit from the parent directory
I am running the web app with tomcat8, I did use umask 007 to set permission for folder which enable the sub files and folder inherit the permission from the parent directory, I was successful which some directories but the directories under the tomcat8/webapps did not inherit the permissions. Could you please suggest me other ways?
For example :
Sucessfull
cd /usr/local/
umask 007 folder1
chgrp -R tomcat8 folder1
chmod -R g+s folder1
cd /usr/local/software/
umask 007 backupfolder
chgrp -R tomcat8 backupfolder
chmod -R g+s backupfolder
umask 007 folder2
chgrp -R tomcat8 folder2
chmod -R g+s folder2
This one is failed
cd /var/lib/tomcat8/
umask 007 webapps
chgrp -R tomcat8 webapps
chmod -R g+s webapps
I set the permissions before running script to deploy the web app under tomcat8.
After running the script, it copy some files and directories to the folder1, folder2, backupfolder with the same permission with but it doesnt work with the tomcat8/webapps directory. Could anyone help me? Thank you!