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 do I connect to Linux VPS through SSH from Linux and Windows OS?

This article will guide you on how to login to Linux VPS through SSH (Secure Shell) from Linux...

How to change the MySQL timeout limit in Linux?

Please refer to the following article to change the MySQL timeout error.  Log in to your...

How to set up Apache password Authentication on Ubuntu 18.08?

On the internet, almost all the applications have some parts which should be protected with a...

How to flush DNS cache on linux?

DNS is responsible for resolving website names into their respective IPs. Whenever you visit a...

How to install Codeignetor centos 7?

Codeignetor is a PHP framework used to build a web application that is used widely by the...

  • 0 Users Found This Useful

Was this answer helpful?