Skip to content

Instantly share code, notes, and snippets.

@taivu
Created May 12, 2020 14:08
Show Gist options
  • Save taivu/02fb8e98bc5f01a524fc8cb7e8afde3c to your computer and use it in GitHub Desktop.
Save taivu/02fb8e98bc5f01a524fc8cb7e8afde3c to your computer and use it in GitHub Desktop.

Revisions

  1. taivu created this gist May 12, 2020.
    9 changes: 9 additions & 0 deletions drupal-fix-permission-flags.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # Sometimes copying files directly from a vagrant sandbox will results in all files and directories being 777
    # These two commands will make every file and directory under the current working directory have normal permission flags.
    # These commands should be run in the `/private_files` and `/pub/sites/default/files` folder.
    #
    # Directories: rwxrwxr-x
    # Files: rw-rw-r--

    find . -type d -exec chmod 0775 {} +
    find . -type f -exec chmod 0664 {} +