Skip to content

fix: remove executable permssion from files that should not have it

Created by: c-dilks

Removes executable permission from files such as

  • .java
  • .gif
  • .xml
  • .docx
  • etc.

Procedure:

#!/bin/bash
find . -type f -executable -print |\
  grep -vE '\.sh$' |\
  grep -v '^\./bin/' |\
  grep -v '^\./\.git/' |\
  while read f; do
    chmod 644 "$f"
    git update-index --chmod=-x "$f"
  done

Merge request reports

Loading