How to check wrong permissions like 777 in the whole linux dedicated server

You can check any wrong or 777 permission granted to any folder in your dedicated server just by one command.

Steps to check wrong permission of the folders in dedicated linux server.

  1. Login to your server through root  using potty software
  2. Copy and paste that command

find /home/*/public_html -type d -perm 777 > /root/wrongPERM.log
i=”/var/infected/” ; mkdir -p $i ; chown root:root $i ; chmod 700 $i ; clamscan –include-dir=/home/ –include-dir=/root/ –include-dir=/tmp/ –quiet -r -i -l

It will start checking your server for wrong permissions. will take a bit time, when the process would be completed you can download file named as wrongPERM.log available under root folder.

You can download this file and open using any of the programme like word pad, word or note pad.

After opening this file, you can check the folders with 777 permission and change them to 755 maximum.


Keep in mind the maximum permissions to folder could be 755 and maximum permissions to file could be 644, if you will give more permissions than the last specified, it could harm your data by any hacker’s injection.

Add a Comment

*