How to Change File Permissions Recursively in Linux?

Execute the below mentioned commands as per your requirement to change File Permissions Recursively in Linux.

To change the permission of single file we use chmod command as:

 chmod 0666 /home/new/abc

In the above command,

  1. 0666 is the file permission
  2. /home/new/abc is the path of the file of which I want to change the permission. You can change them as per your requirement.
Now, below are the commands that will change file permission of multiple files in a current directory or files inside a directory.
chmod 0744 /home/new/abc /home/new/test
chmod -R 0740 path/of/the/directory
find /path/of/the/directory -type f -perm 0755 -exec chmod 0644 {} \;
find /path/of/directory/ -not -path "/pathof/directory/not/include*" -type f -perm 755 -exec chmod 644 {} \;
find /home/your_account/public_html -name filename | xargs chmod 444
That's It !
Check out the blog to get detailed explanation of the above given commands.
  • change file permission of all the same named files with Linux co, how to change file permission of all directories and sub-directo, how to change file permission of all the files with same name in, change file permission of all the same named files with Linux co, change file prmission recursively from PHP file in cPanel, how to change file permissions recursively, how to change file permission of all the files with same name in, change file permission recursively with chmod vommand, change bulk file permissions in Linux, how to recursively change file permission in Linux, run shell commands via PHP file in cPanel, how to change file permission of all directories and sub-directo
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What are some Basic SSH commands?

List of some basic SSH commands are: ls – This command is used to list all files and...

How to connect to SSH?

Putty is an open-source SSH client used to connect to a remote server. This article describes how...

20 Basic Linux Commands and their Uses.

Following are the top 20 basic Linux Commands with Live Examples that would definitely help you...

How to Block/Unblock IPs from SSH?

You can easily block or unblock IPs  from SSH. #1. Block An IP Address from SSH First of all,...

How to install CpCleaner in cPanel through SSH?

CpCleaner is a cPanel plugin created to give cPanel users the option to clean junk files that...