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

Binary does not have an execute permission by default #97

Closed
ZIMkaRU opened this issue Jan 3, 2024 · 4 comments
Closed

Binary does not have an execute permission by default #97

ZIMkaRU opened this issue Jan 3, 2024 · 4 comments

Comments

@ZIMkaRU
Copy link

ZIMkaRU commented Jan 3, 2024

After update from 4.1.0 to 4.2.0 I faced Permission denied
Looks like binaries do not have an execute permission by default
after fs.chmodSync(appBuilderPath, '755') or sudo chmod +x it works as expected


Logs:

/bin/sh: 1: /project/node_modules/app-builder-bin/linux/x64/app-builder: Permission denied
Error in updating YAML file and configurations with blockmap Error: Command failed: /project/node_modules/app-builder-bin/linux/x64/app-builder blockmap --input=/project/dist/BitfinexReport-4.17.0-beta.0-x64-mac.zip --output=/project/dist/BitfinexReport-4.17.0-beta.0-x64-mac.zip.blockmap --compression=gzip
/bin/sh: 1: /project/node_modules/app-builder-bin/linux/x64/app-builder: Permission denied

    at checkExecSyncError (node:child_process:885:11)
    at execSync (node:child_process:957:15)
    at Object.<anonymous> (/project/scripts/node/generate-mac-zipand-blockmap.js:37:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Function.Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at afterAllArtifactBuild (/project/electron-builder-config.js:252:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at /project/node_modules/app-builder-lib/src/index.ts:81:36
    at executeFinally (/project/node_modules/builder-util/src/promise.ts:12:14) {
  status: 126,
  signal: null,
  output: [
    null,
    <Buffer >,
    <Buffer 2f 62 69 6e 2f 73 68 3a 20 31 3a 20 2f 70 72 6f 6a 65 63 74 2f 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 61 70 70 2d 62 75 69 6c 64 65 72 2d 62 69 6e 2f ... 41 more bytes>
  ],
  pid: 1382,
  stdout: <Buffer >,
  stderr: <Buffer 2f 62 69 6e 2f 73 68 3a 20 31 3a 20 2f 70 72 6f 6a 65 63 74 2f 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 61 70 70 2d 62 75 69 6c 64 65 72 2d 62 69 6e 2f ... 41 more bytes>
}
ZIMkaRU added a commit to ZIMkaRU/bfx-report-electron that referenced this issue Jan 3, 2024
It's required as binary does not have an execute permission by default
develar/app-builder#97
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 15, 2024
@mmaietta
Copy link
Collaborator

I'm actually still trying to fix this. It seems that the executable permissions get removed on upload? I added this to the build script and the executable still didn't keep the permission set

find mac/ win/ linux/ -type f -exec chmod +x {} \;

@mmaietta
Copy link
Collaborator

Fixed in https://github.com/develar/app-builder/releases/tag/v5.0.0-alpha.1

pnpm requires publishConfig.executableFiles: [<files>] in the package.json to keep the +x permissions

@mmaietta mmaietta removed the Stale label Mar 15, 2024
@ZIMkaRU
Copy link
Author

ZIMkaRU commented Mar 18, 2024

@mmaietta thanks

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

No branches or pull requests

2 participants