electron-installer-debian
electron-installer-debian copied to clipboard
fix: ensure control directory has right permissions
This PR aims to fix the error:
dpkg-deb: error: control directory has bad permissions 777 (must be >=0755 and <=0775)
Error: Command failed with a non-zero return code (2):
...
Related issues:
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.
What are the conditions under which the control directory has permissions of 777 then?
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.
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:
- figure out how to change the value of
os.tmpdir()
so that the staging directory goes to a custom location (I think you should just be able to change theTMPDIR
,TMP
, orTEMP
environment variable(s)). You should do this just in the scope of the test. - make sure that the custom location forces all files/folders created in it to have 777 permissions.