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

init cmd creates directories with wrong permissions #25

Closed
justinfx opened this issue Dec 27, 2020 · 3 comments · Fixed by #27
Closed

init cmd creates directories with wrong permissions #25

justinfx opened this issue Dec 27, 2020 · 3 comments · Fixed by #27

Comments

@justinfx
Copy link

I just gave this tool a try for the first time, and the first command I ran was changie init. The command failed with the following

$ changie init   
Error: mkdir changes/unreleased: permission denied

$ ls -ld ./changes
drw-r--r-- 2 user group 4096 Dec 28 12:46 ./changes

I can see that the wrong permissions are being used to create the non-existent directory (0644 instead of 0755)
3737ce6#diff-345cd3beb7d905a8bef99d83e99c62678bfd5101a26d30104ecc9320602072acR70

It is likely that this bug is not being caught because the tests use an in-memory afero filesystem which may not exercise the limits of the filesystem permissions.

@miniscruff
Copy link
Owner

Hmm, let me give this a try. I was having issues with the github action but using sudo fixed it. It might just be bad permissions.

@miniscruff
Copy link
Owner

@justinfx I modified the init command to reflect the right file permissions, if this fixes your issue let me know.

@justinfx
Copy link
Author

Thanks for that fix. The directories are now created with proper permissions. It does create the "header.tpl.md` file with executable permissions, but that isn't a breaking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants