bonfire-networks / bonfire-app

Bonfire - tend to your digital life in community. Customise and host your own online space and control your experience at the most granular level.
https://bonfirenetworks.org
GNU Affero General Public License v3.0
522 stars 37 forks source link

Too many files are executable #927

Closed peaceful-james closed 1 month ago

peaceful-james commented 1 month ago

When I generate a new phoenix project, the mix.exs file has these permissions:

-rw-r--r--   

But in this project the mix.exs file has these permissions:

-rwxr-xr-x  

Many other files are like this.

For example, the LICENSE is executable.

Is there an explanation for this?

peaceful-james commented 1 month ago

You can find all the executable files in the project like this:

find . -type f -executable 2>/dev/null

I will put the output here and maybe a maintainer can tell me which ones should be executable and I will fix the rest.

./nix/shell.nix
./nix/module.nix
./nix/package.nix
./.github/ISSUE_TEMPLATE/other.md
./.github/ISSUE_TEMPLATE/bug_report.md
./.github/ISSUE_TEMPLATE/feature_request.md
./.github/workflows/release.yaml
./.tool-versions
./.gitignore
./README.md
./.erlang.cookie
./LICENSE
./.dockerignore
./tool-versions-to-env.sh
./test/test_helper.exs
./test/support/conn_case.ex
./test/support/channel_case.ex
./test/support/data_case.ex
./test/support/data_helpers.ex
./test/support/fake_helpers.ex
./.iex.exs
./mix.exs
./js-deps-get.sh
./Dockerfile.dev
./git-publish.sh
./.git/hooks/pre-rebase.sample
./.git/hooks/pre-push.sample
./.git/hooks/fsmonitor-watchman.sample
./.git/hooks/prepare-commit-msg.sample
./.git/hooks/pre-applypatch.sample
./.git/hooks/pre-receive.sample
./.git/hooks/update.sample
./.git/hooks/pre-commit.sample
./.git/hooks/post-update.sample
./.git/hooks/push-to-checkout.sample
./.git/hooks/commit-msg.sample
./.git/hooks/applypatch-msg.sample
./.git/hooks/pre-merge-commit.sample
./docs/ARCHITECTURE.md
./docs/HACKING.md
./docs/index.html
./docs/MRF.md
./docs/GRAPHQL.md
./docker-compose.release.yml
./flavours/reflow/README.md
./flavours/reflow/repo/seeds/20210122131234_observe_classifications.exs
./flavours/reflow/repo/seeds.exs
./flavours/reflow/config/deps.js.sh
./flavours/cooperation/config/deps.js.sh
./flavours/classic/README.md
./flavours/classic/repo/seeds.exs
./flavours/classic/DEPENDENCIES.md
./flavours/classic/config/bonfire_api_graphql.exs
./flavours/classic/config/templates/not_secret.env
./flavours/classic/config/templates/public.env
./flavours/classic/config/bonfire_common.exs
./flavours/classic/config/dev.exs
./flavours/classic/config/runtime.exs
./flavours/classic/config/bonfire_search.exs
./flavours/classic/config/activity_pub.exs
./flavours/classic/config/bonfire_federate_activitypub.exs
./flavours/classic/config/bonfire_quantify.exs
./flavours/classic/config/bonfire_ui.exs
./flavours/classic/config/bonfire_files.exs
./flavours/classic/config/deploy/Caddyfile2
./flavours/classic/config/prod.exs
./flavours/classic/config/deps.js.sh
./flavours/classic/config/bonfire_data.exs
./flavours/classic/config/bonfire_geolocate.exs
./flavours/classic/config/test.exs
./flavours/classic/config/config.exs
./flavours/classic/config/bonfire_mailer.exs
./flavours/classic/config/activity_pub_test.exs
./.sobelow/sobelow-vsn-check
./Dockerfile.release
./Makefile
./docker-compose.yml
peaceful-james commented 1 month ago

I went through the list and it was obvious what should and should not be executable.

Will fix like this:

### Leaving these files as executable
# ./nix/shell.nix
# ./nix/module.nix
# ./nix/package.nix
# ./tool-versions-to-env.sh
# ./js-deps-get.sh
# ./git-publish.sh
# ./.git/hooks/pre-rebase.sample
# ./.git/hooks/pre-push.sample
# ./.git/hooks/fsmonitor-watchman.sample
# ./.git/hooks/prepare-commit-msg.sample
# ./.git/hooks/pre-applypatch.sample
# ./.git/hooks/pre-receive.sample
# ./.git/hooks/update.sample
# ./.git/hooks/pre-commit.sample
# ./.git/hooks/post-update.sample
# ./.git/hooks/push-to-checkout.sample
# ./.git/hooks/commit-msg.sample
# ./.git/hooks/applypatch-msg.sample
# ./.git/hooks/pre-merge-commit.sample
# ./flavours/reflow/config/deps.js.sh
# ./flavours/cooperation/config/deps.js.sh
# ./flavours/classic/config/deps.js.sh

echo "lets make the world a little safer"
chmod -x ./.github/ISSUE_TEMPLATE/other.md
chmod -x ./.github/ISSUE_TEMPLATE/bug_report.md
chmod -x ./.github/ISSUE_TEMPLATE/feature_request.md
chmod -x ./.github/workflows/release.yaml
chmod -x ./.tool-versions
chmod -x ./.gitignore
chmod -x ./README.md
chmod -x ./.erlang.cookie
chmod -x ./LICENSE
chmod -x ./.dockerignore
chmod -x ./test/test_helper.exs
chmod -x ./test/support/conn_case.ex
chmod -x ./test/support/channel_case.ex
chmod -x ./test/support/data_case.ex
chmod -x ./test/support/data_helpers.ex
chmod -x ./test/support/fake_helpers.ex
chmod -x ./.iex.exs
chmod -x ./mix.exs
chmod -x ./Dockerfile.dev
chmod -x ./docs/ARCHITECTURE.md
chmod -x ./docs/HACKING.md
chmod -x ./docs/index.html
chmod -x ./docs/MRF.md
chmod -x ./docs/GRAPHQL.md
chmod -x ./docker-compose.release.yml
chmod -x ./flavours/reflow/README.md
chmod -x ./flavours/reflow/repo/seeds/20210122131234_observe_classifications.exs
chmod -x ./flavours/reflow/repo/seeds.exs
chmod -x ./flavours/classic/README.md
chmod -x ./flavours/classic/repo/seeds.exs
chmod -x ./flavours/classic/DEPENDENCIES.md
chmod -x ./flavours/classic/config/bonfire_api_graphql.exs
chmod -x ./flavours/classic/config/templates/not_secret.env
chmod -x ./flavours/classic/config/templates/public.env
chmod -x ./flavours/classic/config/bonfire_common.exs
chmod -x ./flavours/classic/config/dev.exs
chmod -x ./flavours/classic/config/runtime.exs
chmod -x ./flavours/classic/config/bonfire_search.exs
chmod -x ./flavours/classic/config/activity_pub.exs
chmod -x ./flavours/classic/config/bonfire_federate_activitypub.exs
chmod -x ./flavours/classic/config/bonfire_quantify.exs
chmod -x ./flavours/classic/config/bonfire_ui.exs
chmod -x ./flavours/classic/config/bonfire_files.exs
chmod -x ./flavours/classic/config/deploy/Caddyfile2
chmod -x ./flavours/classic/config/prod.exs
chmod -x ./flavours/classic/config/bonfire_data.exs
chmod -x ./flavours/classic/config/bonfire_geolocate.exs
chmod -x ./flavours/classic/config/test.exs
chmod -x ./flavours/classic/config/config.exs
chmod -x ./flavours/classic/config/bonfire_mailer.exs
chmod -x ./flavours/classic/config/activity_pub_test.exs
chmod -x ./.sobelow/sobelow-vsn-check
chmod -x ./Dockerfile.release
chmod -x ./Makefile
chmod -x ./docker-compose.yml
peaceful-james commented 1 month ago

image

I will change the .nix files too

mayel commented 1 month ago

Not sure why that was the case, thanks for the fix.