Change Permissions on All Files or All Directories in Linux
- 06/06/2020 8:01 PM
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 {} \;
# find [YOURDIR] -type f -exec chmod 644 {} \;