Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed file permissions from 755 to 644 of non-executable files in git. #24005

Merged

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Aug 3, 2019

Description (*)

This was triggered by 90df53c#commitcomment-34538350

Fixed Issues (if relevant)

  1. Permissions not set correctly  #1453: Permissions not set correctly
    (it was already fixed before, but until there is some automated test pointing out these problems, it will keep happening I'm afraid)

This corrects the file permissions for the following file types from 755 to 644:

.bmp
.css
.eot
.gif
.gitignore
.htaccess
.ico
.jpg
.js
.json
.less
.map
.md
.php
.phtml
.png
.svg
.ttf
.txt
.woff
.woff2
.xml
.xsd

Manual testing scenarios (*)

  1. Clone the M2 repo
  2. Execute: find . -type f ! -path './.git/*' ! -perm 644
  3. This should only report executable files, at the time of writing those are:
./bin/magento
./dev/tests/integration/bin/magento
./dev/travis/before_install.sh
./dev/travis/before_script.sh

Questions or comments

In order to prevent this from happening in the future, it would be nice if some sort of test would get created which can detect this.
A potential test for this could be:

  1. Execute find . -type f ! -path './.git/*' ! -perm 644
  2. For all the files it finds, if one of those does not start with #!/usr/bin/env on the first line, it should get flagged.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Aug 3, 2019

Hi @hostep. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-5540 has been created to process this Pull Request
✳️ @ihor-sviziev, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Aug 3, 2019
@engcom-Delta engcom-Delta self-assigned this Aug 6, 2019
@engcom-Delta
Copy link
Contributor

✔️ QA passed

@magento-engcom-team magento-engcom-team merged commit 2110afd into magento:2.3-develop Aug 8, 2019
@m2-assistant
Copy link

m2-assistant bot commented Aug 8, 2019

Hi @hostep, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.4 milestone Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants