How to Find All Files/ Folders with 777 Permission in Linux?

First, let us understand the meaning of 777 file permission in Linux. If any files/ folders on your Linux server have the 777 file permission, then everyone can read and write that file. This is not a good security practice as it can harm 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 this command to find the file with the 777 permission in the /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 to find the files/ folders.

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

find $HOME -perm 777 

3. If you just want to find the files with the 777 permission and don’t need to include the folders, then you can run this command – 

find /home/ -perm 777 -type f

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

4. In case you only want to find the directories with the 777 permission in /home, then you can run this command – 

find /home/ -perm 777 -type f

Was this answer helpful?

« Back