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

Permission denied when bootstrap script tries to rename the country-template directory under Windows 10 #82

Open
fluff79 opened this issue Jan 30, 2020 · 16 comments
Labels
kind:fix A bug fix

Comments

@fluff79
Copy link

fluff79 commented Jan 30, 2020

Hi there!

I really enjoy OpenFisca, but I recently encountered an issue.

Here is what I did:

I downloaded the country_template_master. I opened GITbash in the folder.
I typed: export COUNTRY_NAME=Jersey which worked
I typed: export REPOSITORY_URL=https://github.com/fluff79/OpenFisca-$COUNTRY_NAME which worked

I typed: ./bootstrap.sh and got the error above

mv: cannot move 'country-template-master' to 'openfisca-jersey': Permission denied

Here is what I expected to happen:

I expected the bootstrap script to run all the way through to set up the template on my computer

Here is what actually happened:

I typed: ./bootstrap.sh and got the error:

mv: cannot move 'country-template-master' to 'openfisca-jersey': Permission denied

Here is data (or links to it) that can help you reproduce this issue:

I am following the instructions here
https://github.com/openfisca/country-template

Context

I identify more as a:

  • Analyst (I make macroscopic computations on real populations).
  • Business expert (I create tests and model legislation).
  • Commenter (I make data visualisations).

I only know a little bit of python and a bit how to use git/GitHub etc

@fluff79
Copy link
Author

fluff79 commented Jan 30, 2020

I have a pc running windows 10. I did not run this script from a particular environment set up for open fisca. Im using python 3.6. I tried googling the error and changing file rights through my shell to allow the script to move folders , but this didn't work. It was hard to find clear instructions to help me online

@fluff79
Copy link
Author

fluff79 commented Jan 30, 2020

I didn't have the folders open or files in use which could cause an error when moving the file

@fluff79
Copy link
Author

fluff79 commented Jan 31, 2020

For some reason, the script runs this:
mv country-template-master openfisca-$lowercase_country_name
and gives the error above
when i go in to the terminal and run the command my self
mv country-template-master openfisca-jersey
it succeeds

does the script file need a certain permission? I'm not sure why it doesn't work when I run it

@fluff79
Copy link
Author

fluff79 commented Jan 31, 2020

Also, could it be because we're trying to move the country template folder (which includes the script file) into a new folder, whilst the script file is being read? I'm guessing this isn't it because everyone would have the same problem?

@fluff79
Copy link
Author

fluff79 commented Jan 31, 2020

OK, so I've just copied the script file so it is in the same directory as the country template master folder. I edited the script so that the first thing it does it go into the country template master folder, then the rest of the script is the same.
When I run the script i don't get the error, and it seems to work otherwise.
Let me paste the info I get.

Paulo@MacGregor MINGW64 ~/coding
$ export COUNTRY_NAME=Jersey

Paulo@MacGregor MINGW64 ~/coding
$ export REPOSITORY_URL=https://github.com/fluff79/OpenFisca-$COUNTRY_NAME

Paulo@MacGregor MINGW64 ~/coding
$ ./bootstrap.sh
/c/Users/Paulo/coding
Initialized empty Git repository in C:/Users/Paulo/Coding/openfisca-jersey/.git/
warning: LF will be replaced by CRLF in .circleci/config.yml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .circleci/has-functional-changes.sh.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .circleci/is-version-number-acceptable.sh.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .circleci/publish-git-tag.sh.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .github/ISSUE_TEMPLATE.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .github/PULL_REQUEST_TEMPLATE.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in CHANGELOG.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in CONTRIBUTING.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in LICENSE.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in MANIFEST.in.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Makefile.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in bootstrap.sh.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/__init__.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/entities.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/benefits/basic_income.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/benefits/housing_allowance.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/benefits/index.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/general/age_of_majority.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/general/age_of_retirement.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/taxes/housing_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/taxes/income_tax_rate.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/parameters/taxes/social_security_contribution.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/reforms/flat_social_security_contribution.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/reforms/modify_social_security_taxation.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/reforms/removal_basic_income.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/situation_examples/__init__.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/situation_examples/couple.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/situation_examples/single.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/age.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/basic_income.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/disposable_income.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/housing_allowance.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/housing_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/income_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/reforms/modify_social_security_taxation.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/situations/income_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/tests/social_security_contribution.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/variables/benefits.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/variables/demographics.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/variables/housing.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/variables/income.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/variables/stats.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_country_template/variables/taxes.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in setup.cfg.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in setup.py.
The file will have its original line endings in your working directory
[master (root-commit) 7a5dc3c] Initial import from OpenFisca country-template
 Author: OpenFisca Bot <[email protected]>
 48 files changed, 2758 insertions(+)
 create mode 100644 .circleci/config.yml
 create mode 100644 .circleci/has-functional-changes.sh
 create mode 100644 .circleci/is-version-number-acceptable.sh
 create mode 100644 .circleci/publish-git-tag.sh
 create mode 100644 .github/ISSUE_TEMPLATE.md
 create mode 100644 .github/PULL_REQUEST_TEMPLATE.md
 create mode 100644 .gitignore
 create mode 100644 CHANGELOG.md
 create mode 100644 CONTRIBUTING.md
 create mode 100644 LICENSE
 create mode 100644 MANIFEST.in
 create mode 100644 Makefile
 create mode 100644 README.md
 create mode 100644 bootstrap.sh
 create mode 100644 openfisca_country_template/__init__.py
 create mode 100644 openfisca_country_template/entities.py
 create mode 100644 openfisca_country_template/parameters/benefits/basic_income.yaml
 create mode 100644 openfisca_country_template/parameters/benefits/housing_allowance.yaml
 create mode 100644 openfisca_country_template/parameters/benefits/index.yaml
 create mode 100644 openfisca_country_template/parameters/general/age_of_majority.yaml
 create mode 100644 openfisca_country_template/parameters/general/age_of_retirement.yaml
 create mode 100644 openfisca_country_template/parameters/taxes/housing_tax.yaml
 create mode 100644 openfisca_country_template/parameters/taxes/income_tax_rate.yaml
 create mode 100644 openfisca_country_template/parameters/taxes/social_security_contribution.yaml
 create mode 100644 openfisca_country_template/reforms/__init__.py
 create mode 100644 openfisca_country_template/reforms/flat_social_security_contribution.py
 create mode 100644 openfisca_country_template/reforms/modify_social_security_taxation.py
 create mode 100644 openfisca_country_template/reforms/removal_basic_income.py
 create mode 100644 openfisca_country_template/situation_examples/__init__.py
 create mode 100644 openfisca_country_template/situation_examples/couple.json
 create mode 100644 openfisca_country_template/situation_examples/single.json
 create mode 100644 openfisca_country_template/tests/age.yaml
 create mode 100644 openfisca_country_template/tests/basic_income.yaml
 create mode 100644 openfisca_country_template/tests/disposable_income.yaml
 create mode 100644 openfisca_country_template/tests/housing_allowance.yaml
 create mode 100644 openfisca_country_template/tests/housing_tax.yaml
 create mode 100644 openfisca_country_template/tests/income_tax.yaml
 create mode 100644 openfisca_country_template/tests/reforms/modify_social_security_taxation.yaml
 create mode 100644 openfisca_country_template/tests/situations/income_tax.yaml
 create mode 100644 openfisca_country_template/tests/social_security_contribution.yaml
 create mode 100644 openfisca_country_template/variables/benefits.py
 create mode 100644 openfisca_country_template/variables/demographics.py
 create mode 100644 openfisca_country_template/variables/housing.py
 create mode 100644 openfisca_country_template/variables/income.py
 create mode 100644 openfisca_country_template/variables/stats.py
 create mode 100644 openfisca_country_template/variables/taxes.py
 create mode 100644 setup.cfg
 create mode 100644 setup.py
+ sed -i.template 's|country_template|jersey|g' README.md setup.py .circleci/config.yml Makefile openfisca_country_template/entities.py openfisca_country_template/parameters/benefits/basic_income.yaml openfisca_country_template/parameters/benefits/housing_allowance.yaml openfisca_country_template/parameters/benefits/index.yaml openfisca_country_template/parameters/general/age_of_majority.yaml openfisca_country_template/parameters/general/age_of_retirement.yaml openfisca_country_template/parameters/taxes/housing_tax.yaml openfisca_country_template/parameters/taxes/income_tax_rate.yaml openfisca_country_template/parameters/taxes/social_security_contribution.yaml openfisca_country_template/reforms/flat_social_security_contribution.py openfisca_country_template/reforms/modify_social_security_taxation.py openfisca_country_template/reforms/removal_basic_income.py openfisca_country_template/reforms/__init__.py openfisca_country_template/situation_examples/couple.json openfisca_country_template/situation_examples/single.json openfisca_country_template/situation_examples/__init__.py openfisca_country_template/tests/age.yaml openfisca_country_template/tests/basic_income.yaml openfisca_country_template/tests/disposable_income.yaml openfisca_country_template/tests/housing_allowance.yaml openfisca_country_template/tests/housing_tax.yaml openfisca_country_template/tests/income_tax.yaml openfisca_country_template/tests/reforms/modify_social_security_taxation.yaml openfisca_country_template/tests/situations/income_tax.yaml openfisca_country_template/tests/social_security_contribution.yamlopenfisca_country_template/variables/benefits.py openfisca_country_template/variables/demographics.py openfisca_country_template/variables/housing.py openfisca_country_template/variables/income.py openfisca_country_template/variables/stats.py openfisca_country_template/variables/taxes.py openfisca_country_template/__init__.py
+ sed -i.template 's|Country-Template|Jersey|g' README.md setup.py .github/PULL_REQUEST_TEMPLATE.md CONTRIBUTING.md openfisca_country_template/entities.py openfisca_country_template/parameters/benefits/basic_income.yaml openfisca_country_template/parameters/benefits/housing_allowance.yaml openfisca_country_template/parameters/benefits/index.yaml openfisca_country_template/parameters/general/age_of_majority.yaml openfisca_country_template/parameters/general/age_of_retirement.yaml openfisca_country_template/parameters/taxes/housing_tax.yaml openfisca_country_template/parameters/taxes/income_tax_rate.yaml openfisca_country_template/parameters/taxes/social_security_contribution.yaml openfisca_country_template/reforms/flat_social_security_contribution.py openfisca_country_template/reforms/modify_social_security_taxation.py openfisca_country_template/reforms/removal_basic_income.py openfisca_country_template/reforms/__init__.py openfisca_country_template/situation_examples/couple.json openfisca_country_template/situation_examples/single.json openfisca_country_template/situation_examples/__init__.py openfisca_country_template/tests/age.yaml openfisca_country_template/tests/basic_income.yaml openfisca_country_template/tests/disposable_income.yaml openfisca_country_template/tests/housing_allowance.yaml openfisca_country_template/tests/housing_tax.yaml openfisca_country_template/tests/income_tax.yaml openfisca_country_template/tests/reforms/modify_social_security_taxation.yaml openfisca_country_template/tests/situations/income_tax.yaml openfisca_country_template/tests/social_security_contribution.yaml openfisca_country_template/variables/benefits.py openfisca_country_template/variables/demographics.py openfisca_country_template/variables/housing.py openfisca_country_template/variables/income.py openfisca_country_template/variables/stats.py openfisca_country_template/variables/taxes.py openfisca_country_template/__init__.py
+ sed -i.template -e 3,26d README.md
+ sed -i.template 's|country-template|jersey|g' README.md
+ sed -i.template 's|https://github.com/openfisca/openfisca-country-template||g' setup.py
+ find . -name '*.template' -type f -delete
+ set +x
rm 'bootstrap.sh'
warning: LF will be replaced by CRLF in .circleci/config.yml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .github/PULL_REQUEST_TEMPLATE.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in CONTRIBUTING.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Makefile.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/__init__.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/entities.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/benefits/basic_income.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/benefits/housing_allowance.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/benefits/index.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/general/age_of_majority.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/general/age_of_retirement.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/taxes/housing_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/taxes/income_tax_rate.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/parameters/taxes/social_security_contribution.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/reforms/flat_social_security_contribution.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/reforms/modify_social_security_taxation.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/reforms/removal_basic_income.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/situation_examples/__init__.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/situation_examples/couple.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/situation_examples/single.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/age.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/basic_income.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/disposable_income.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/housing_allowance.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/housing_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/income_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/reforms/modify_social_security_taxation.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/situations/income_tax.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/tests/social_security_contribution.yaml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/variables/benefits.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/variables/demographics.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/variables/housing.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/variables/income.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/variables/stats.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in openfisca_jersey/variables/taxes.py.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in setup.py.
The file will have its original line endings in your working directory
[master d447dde] Customise country-template through script
 Author: OpenFisca Bot <[email protected]>
 39 files changed, 28 insertions(+), 109 deletions(-)
 delete mode 100644 bootstrap.sh
 rename {openfisca_country_template => openfisca_jersey}/__init__.py (92%)
 rename {openfisca_country_template => openfisca_jersey}/entities.py (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/benefits/basic_income.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/benefits/housing_allowance.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/benefits/index.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/general/age_of_majority.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/general/age_of_retirement.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/taxes/housing_tax.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/taxes/income_tax_rate.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/parameters/taxes/social_security_contribution.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/reforms/__init__.py (100%)
 rename {openfisca_country_template => openfisca_jersey}/reforms/flat_social_security_contribution.py (100%)
 rename {openfisca_country_template => openfisca_jersey}/reforms/modify_social_security_taxation.py (100%)
 rename {openfisca_country_template => openfisca_jersey}/reforms/removal_basic_income.py (100%)
 rename {openfisca_country_template => openfisca_jersey}/situation_examples/__init__.py (100%)
 rename {openfisca_country_template => openfisca_jersey}/situation_examples/couple.json (100%)
 rename {openfisca_country_template => openfisca_jersey}/situation_examples/single.json (100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/age.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/basic_income.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/disposable_income.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/housing_allowance.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/housing_tax.yaml(100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/income_tax.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/reforms/modify_social_security_taxation.yaml (71%)
 rename {openfisca_country_template => openfisca_jersey}/tests/situations/income_tax.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/tests/social_security_contribution.yaml (100%)
 rename {openfisca_country_template => openfisca_jersey}/variables/benefits.py (98%)
 rename {openfisca_country_template => openfisca_jersey}/variables/demographics.py (97%)
 rename {openfisca_country_template => openfisca_jersey}/variables/housing.py (97%)
 rename {openfisca_country_template => openfisca_jersey}/variables/income.py (96%)
 rename {openfisca_country_template => openfisca_jersey}/variables/stats.py (97%)
 rename {openfisca_country_template => openfisca_jersey}/variables/taxes.py (98%)
************
* All set! *
************


@Br3nda
Copy link
Contributor

Br3nda commented Feb 1, 2020

@fluff79 do you have access to slack? There's a lot of people in various timezones who can give you help as you get started.

@fluff79
Copy link
Author

fluff79 commented Feb 7, 2020

@Br3nda hi! Yes I'm on slack. I've worked around this problem now, but hoped it could be fixed in case someone else has it too

@bonjourmauko
Copy link
Member

Hey thanks for posting this here, so we can investigate :)

@masterbox
Copy link

Hi,
I have the same issue, any progress on it ?

@bonjourmauko bonjourmauko self-assigned this Nov 8, 2020
@bonjourmauko
Copy link
Member

bonjourmauko commented Nov 8, 2020

Hi @masterbox, no sadly no progress as it is impossible for me to reproduce the error.

Could you please let us know what do you get when running the following commands? I suspect it is a matter of permissions:

me@diotimac:~/openfisca/country-template-master > whoami
me

me@diotimac:~/openfisca/country-template-master > ls -hAl .. | grep country-template-master
drwxr-xr-x 15 me staff  480 Oct 20 19:23 country-template-master

me@diotimac:~/openfisca/country-template-master > ls -hAl .
total 96K
drwxr-xr-x 6 me staff  192 Oct 20 19:23 .circleci
drwxr-xr-x 4 me staff  128 Oct 20 19:23 .github
-rw-r--r-- 1 me staff  139 Oct 20 19:23 .gitignore
-rw-r--r-- 1 me staff  13K Oct 20 19:23 CHANGELOG.md
-rw-r--r-- 1 me staff 4.6K Oct 20 19:23 CONTRIBUTING.md
-rw-r--r-- 1 me staff  34K Oct 20 19:23 LICENSE
-rw-r--r-- 1 me staff   47 Oct 20 19:23 MANIFEST.in
-rw-r--r-- 1 me staff 1.4K Oct 20 19:23 Makefile
-rw-r--r-- 1 me staff 9.0K Oct 20 19:23 README.md
-rwxr-xr-x 1 me staff 2.1K Oct 20 19:23 bootstrap.sh
drwxr-xr-x 9 me staff  288 Oct 20 19:23 openfisca_country_template
-rw-r--r-- 1 me staff  378 Oct 20 19:23 setup.cfg
-rw-r--r-- 1 me staff 1.4K Oct 20 19:23 setup.py

@MattiSG
Copy link
Member

MattiSG commented Aug 9, 2021

Reading through this issue to understand how it could be reproduced. If it cannot be reproduced, it should perhaps be closed.

I edited the script so that the first thing it does it go into the country template master folder, then the rest of the script is the same. When I run the script i don't get the error, and it seems to work otherwise.

This is strange to me, as “going into the country template master folder” is already the first thing the script does (after checking variables are properly defined).

I see one potential problem with that cd $(dirname $0) instruction: it should be cd $(dirname "$0") in order to support spaces in file paths. However, it does not seem like @fluff79's directory trail (/c/Users/Paulo/coding/) had a space in it.

I wonder if $0 could return a different value in the Windows 10 bash emulator?

@fluff79 do you remember which bash emulator you were running at the time?
@masterbox on which platform did you run this script?

@MattiSG MattiSG changed the title mv: cannot move 'country-template-master' to 'openfisca-jersey': Permission denied Permission denied when bootstrap script tries to rename the country-template directory Aug 9, 2021
@masterbox
Copy link

@masterbox on which platform did you run this script?

Hi
I think it was on Windows 10.

@MattiSG MattiSG changed the title Permission denied when bootstrap script tries to rename the country-template directory Permission denied when bootstrap script tries to rename the country-template directory under Windows 10 Aug 11, 2021
@MattiSG
Copy link
Member

MattiSG commented Aug 11, 2021

Thanks @masterbox! This permission issue seems specific to Windows 10 then.

@fluff79
Copy link
Author

fluff79 commented Aug 14, 2021 via email

@MattiSG
Copy link
Member

MattiSG commented Aug 19, 2021

Thank you for this additional information @fluff79. We'll see if that helps in reproducing 🙂

@verbman
Copy link
Contributor

verbman commented Apr 24, 2024

I can confirm this in Windows 11, tried with elevated admin permissions and standard permissions with various permutations/command prompts and could not find a way to work around the issue other then running it in WSL. Documentation has been added in PR #139 in the README.md file regarding the bootstrap script "Note: this script can only run on Unix systems...". I suspect based on my experience and the comments above that windows is placing a lock on the bootstrap.sh file while it's running and that stops the mv command.

@MattiSG MattiSG removed the kind:bug label Apr 29, 2024
@bonjourmauko bonjourmauko added the kind:fix A bug fix label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:fix A bug fix
Projects
None yet
Development

No branches or pull requests

6 participants