fix: ensure control directory has right permissions#261
fix: ensure control directory has right permissions#261belloyang wants to merge 3 commits intoelectron-userland:mainfrom
Conversation
malept
left a comment
There was a problem hiding this comment.
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.
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.
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: