feat(package): add afterInstall script for chrome-sandbox permissions (#27)
- Updated package.json to include an afterInstall script that adjusts permissions for the chrome-sandbox on Linux. - Added new afterInstall.sh script to ensure proper ownership and permissions for the sandbox file, enhancing security and functionality.
This commit is contained in:
parent
12a87b8b90
commit
eeec1e7178
2 changed files with 12 additions and 1 deletions
|
|
@ -161,7 +161,8 @@
|
|||
"pacman"
|
||||
],
|
||||
"icon": "resources/icons/png",
|
||||
"category": "Development"
|
||||
"category": "Development",
|
||||
"afterInstall": "resources/afterInstall.sh"
|
||||
},
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
|
|
|
|||
10
resources/afterInstall.sh
Executable file
10
resources/afterInstall.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
# Fix chrome-sandbox permissions for SUID sandbox on Linux
|
||||
# See: https://github.com/electron/electron/issues/17972
|
||||
|
||||
SANDBOX_PATH="/opt/${productFilename}/chrome-sandbox"
|
||||
|
||||
if [ -f "$SANDBOX_PATH" ]; then
|
||||
chown root:root "$SANDBOX_PATH"
|
||||
chmod 4755 "$SANDBOX_PATH"
|
||||
fi
|
||||
Loading…
Reference in a new issue