Change Permissions on All Files or All Directories in Linux


The first command is to change permissions on all DIRECTORIES. You can replace [YOURDIR] to make it run recursively from the folder in which you are already located... (Be sure to set the permissions as YOU need them)

# find [YOURDIR] -type d -exec chmod 755 {} \;

The Second Command is to do the same for FILES (be sure to set the permissions as YOU require them such as 755, 644 etc)

# find [YOURDIR] -type f -exec chmod 644 {} \;

Comments

Please login to comment