Thursday, March 13, 2014

Folder and file permission change on Centos 6.3

chmod -R u=rwX,g=,o= /home/*
chmod -R u=rwX,g=rX,o= /home/srinivas.k
find . -executable -type f -print0 | xargs -I{} -0 chmod g-x {}
 find . -name "*tomcat*" -type d  -print0 | xargs -I{} -0 chmod u=rwx,g=,o= {}/conf
find . -name "*tomcat*" -type d -print0 | xargs -I{} -0 chmod u=rw,g=o= {}/conf/server.xml

find . -name ".ssh" -type d -print0 | xargs -I{} -0 chmod u=rwX,g=o= {}
find . -name ".ssh" -type d -print0 | xargs -I{} -0 chmod u=rw,g=o= {}/authorized_keys

No comments:

Post a Comment