I think most of the exploit occurs due to the insecure files/folder permissions.
That's why I want to scan my server once in every 24 hours for 777 permission files /folders.
I use following commands for it-
To check & correct files permission : find /home/*/public_html -type f -perm 0777 -exec chmod 644 {} \;
To check & correct folder permission : find /home/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
I want to run it automatically using cron .
Can anyone help me to write a cron command and set it as root ?
That's why I want to scan my server once in every 24 hours for 777 permission files /folders.
I use following commands for it-
To check & correct files permission : find /home/*/public_html -type f -perm 0777 -exec chmod 644 {} \;
To check & correct folder permission : find /home/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
I want to run it automatically using cron .
Can anyone help me to write a cron command and set it as root ?