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

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 

Related Articles

How to clean yum cache on CentOS?

We all know that YUM is an open-source command-line package. When a package is downloaded,...

The action Install for product MySQL Server 5.7.19 failed.

You may face this error while installing MySQL 5.7 or upgrading MySQL 5.6 to 5.7. Here, is the...

How to install Google Chrome on Ubuntu 18.04 using the Command Line?

Following are the steps to install Google Chrome using Command-Line. Edit the source.list file...

How to Install NodeBB on a CentOS VPS?

NodeBB is an open source and powerful forum software based on the Node.js. It is very easy to...

How to install Magento 2.x in cPanel?

Do you want to install Magento 2.4.2 on Centos with cPanel? Please refer to install Magento 2.4.2...

  • 0 Users Found This Useful

Was this answer helpful?