envio icon indicating copy to clipboard operation
envio copied to clipboard

Inadequate file permissions of source, documentation, and asset files

Open afh opened this issue 1 year ago • 2 comments

Describe the bug The majority of files in this repository have the execute bit set, even though the files do not need to be executable.

To Reproduce

  1. List all files in git along with their file permissions
% git ls-files -s | awk '{print $1, $4}'
100755 .all-contributorsrc
100755 .github/ISSUE_TEMPLATE/bug_report.md
100755 .github/dependabot.yml
100755 .github/workflows/CICD.yml
100755 .gitignore
100755 CHANGELOG.md
100755 CODEOWNERS
100755 CODE_OF_CONDUCT.md
100755 CONTRIBUTING.md
100644 Cargo.lock
100644 Cargo.toml
100755 Cross.toml
100755 LICENSE-APACHE
100755 LICENSE-MIT
100755 README.md
100755 SECURITY.md
100644 assets/envio-gpg-final.gif
100644 assets/envio-passphrase-final.gif
100644 assets/icon-color.svg
100755 assets/logo/cover.png
100755 assets/logo/default.png
100755 assets/logo/info.txt
100755 assets/logo/profile.png
100755 assets/logo/vector/default-monochrome-black.svg
100755 assets/logo/vector/default-monochrome-white.svg
100755 assets/logo/vector/default-monochrome.svg
100755 assets/logo/vector/default.svg
100755 assets/logo/vector/isolated-layout.svg
100755 assets/logo/vector/isolated-monochrome-black.svg
100755 assets/logo/vector/isolated-monochrome-white.svg
100755 build.rs
100755 completions/_envio
100755 completions/_envio.ps1
100755 completions/envio.bash
100755 completions/envio.fish
100755 docs/build_from_source.md
100755 docs/project_layout.md
100755 man/envio.1
100755 src/bin/envio/cli.rs
100755 src/bin/envio/commands.rs
100755 src/bin/envio/main.rs
100755 src/bin/envio/version.rs
100755 src/crypto.rs
100755 src/lib.rs
100755 src/utils.rs

Expected behavior Given that there are not scripts in this repository the source, documentation and assets files should have 100644 instead.

Screenshots N/A ~~If applicable, add screenshots to help explain your problem.~~

Device (please complete the following information):

  • OS: macOS 14.3.1 (23D60)
  • Shell: zsh
  • CLI: 0.5.0

Additional context

One way to correct the file permissions is with the following command: % git ls-files | xargs chmod 0644 and then add and commit the changes.

afh avatar Feb 13 '24 15:02 afh

I mean, this isn't something too concerning or destructive. The only reason I hesitate to fix the file permissions is that the latest commit message on every file and folder would be 'Update file permissions,' which would just look weird.

Perhaps we can gradually change it over time, what do you say?

humblepenguinn avatar Feb 17 '24 10:02 humblepenguinn

Agreed, proper file permissions are a nice-to-have. I see your point about the changes the commit message and rewriting the commit history will introduce new commit SHAs, which has its own set of problems. I remember seeing something in the git release notes of a somewhat recent git release that helped with exactly that: Making large scale changes, yet maintaining git blame info, unfortunately I don't remember the details right now.

afh avatar Feb 17 '24 11:02 afh