How to find all files/folders with 777 permission in Linux? Print

  • 0

First of all, let us understand the meaning of 777 file permission in Linux. Suppose, any of the files/folders on your Linux server has the 777 file permission, which means everyone has the access to read and write that file but this is not a good security practice and it can be harmful to your server.

There might be some cases where you require 777 permission when you want your users to download the files/folders from your website. 

  1. Run the below command to find the file with 777 permission in /home directory.

    find /home -perm 777 

You can change the directory on which you need to find out the 777 permission. You can also change the file permission in order to find the files/folders.

  1. Run the below command to find out all the files/folders with 777 permission for the logged-in users within the/home directory.

    find $HOME -perm 777 
  2. Suppose, you just want to find the files with 777 permission and don’t need to include folders than you can run the below command for it.

    find /home/ -perm 777 -type f

     This command will list all the files inside the home directory that has 777 permissions.

     In case, you just want to find the directories with 777 permission in /home then you can run the below command.

find /home/ -perm 777 -type f 

Was this answer helpful?

« Back
Sign up for a newsletter

chat