Číst česky →

Recursively changing permissions on directories or files

1 min read Petr Pomajbík Linux Basics VPS

Contents Bulk Permission Change for Directories Bulk Permission Change for Files

If you want to change permissions for directories or files in Linux, BSD, or MAC OS in bulk and recursively, below you will find a simple guide on how to do it.

Bulk Permission Change for Directories #

find /path/to/base/dir -type d -print0 | xargs -0 chmod 755

Bulk Permission Change for Files #

find /path/to/base/dir -type f -print0 | xargs -0 chmod 644

These changes are recursive, meaning they will apply to all directories and files in the specified path.