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
fix: ensure control directory has right permissions #261
base: main
Are you sure you want to change the base?
fix: ensure control directory has right permissions #261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable. Can you add a test to avoid regressions in the future?
src/installer.js
Outdated
const contrlDir = path.join(this.stagingDir, 'DEBIAN'); | ||
return fs.chmod(contrlDir, 0o755); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit(spelling):
const contrlDir = path.join(this.stagingDir, 'DEBIAN'); | |
return fs.chmod(contrlDir, 0o755); | |
const controlDir = path.join(this.stagingDir, 'DEBIAN'); | |
return fs.chmod(controlDir, 0o755); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi I'm having difficulty creating a test for this. It would require to interfere in the .deb building process and update the control directory's permissions to 777. not sure if the test code is capable of doing it.
73183c5
to
0d02201
Compare
What are the conditions under which the control directory has permissions of 777 then? |
I encountered this error while using electron-installer-debian on the bitbucket pipeline for building. I suspect it's due to the NTFS file system that bitbucket pipeline is using for generating the package. All the files on NTFS automatically have 777 as the permissions. The issue #207 reported a while ago was experiencing the same symptom, however the fix was only to change the permissions of scripts to 755 but not control directory, which should have the same fix to make sure it has the right permissions as well. |
I suspect in order to make the test (this is only speculation, I haven't tried this), you'll need to:
|
This PR aims to fix the error:
Related issues: