Recursively change permissions of files and directories.

Add a Review
2 Downloads (This Week)
Last Update:



By Jan Zumwalt - Ver 2012-03-14
The latest version can be found at

Recursively change files and folders with seperate permissions.

This is a PHP alternative to using: \n
exec("find ".$path." -type f -exec chmod 644 {} \;");
exec("find ".$path." -type d -exec chmod 755 {} \;");

Set these three variables.

$path: Relative or absolute path to file or directory to process.
$filePerm: The permission for files.
$dirPerm: The permission for directory folders.

The permissions are in octal format, so a leading zero "0" is needed
in front of the permission level. See

php-chmod Web Site


  • Recursively change file and directory permissions with different permissions.
  • Browser output shows changes

Update Notifications

Write a Review

User Reviews

Be the first to post a review of php-chmod!

Additional Project Details

Intended Audience

Developers, Information Technology, Security, System Administrators

User Interface


Programming Language



Screenshots can attract more users to your project.
Features can attract more users to your project.

Icons must be PNG, GIF, or JPEG and less than 1 MiB in size. They will be displayed as 48x48 images.