Skip to content

Instantly share code, notes, and snippets.

@jfreites
Created December 12, 2013 15:52
Show Gist options
  • Save jfreites/7930209 to your computer and use it in GitHub Desktop.
Save jfreites/7930209 to your computer and use it in GitHub Desktop.
Set permissions for all files and folders recursively using PHP
<?php
// $ruta is the path to folder, use the correct octal value in your case...
exec ("find $ruta -type d -exec chmod 0777 {} +");
exec ("find $ruta -type f -exec chmod 0777 {} +");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment