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

drawio command-line requires $HOME to be writable #145

Open
kanaka opened this issue Aug 10, 2019 · 0 comments
Open

drawio command-line requires $HOME to be writable #145

kanaka opened this issue Aug 10, 2019 · 0 comments
Assignees

Comments

@kanaka
Copy link

kanaka commented Aug 10, 2019

This is a sub-task of #127

I'm trying to get the command-line export functionality of drawio working from a docker container and running into permissions issues related to $HOME being writable. The default behavior of a docker image is to have $HOME set to "/". This causes drawio to throw an error and hang:

Note the --cap-add SYS_ADMIN requirement is issue #144.

docker run -u $(id -u) -it --cap-add SYS_ADMIN drawio-image drawio -x --crop infile.drawio -o outfile.pdf
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Failed to get 'appData' path
    at App.app._setDefaultAppPaths (/opt/draw.io/resources/electron.asar/browser/api/app.js:54:43)
    at Object.<anonymous> (/opt/draw.io/resources/electron.asar/browser/init.js:133:5)
    at Module._compile (internal/modules/cjs/loader.js:786:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:850:10)
    at internal/main/run_main_module.js:17:11
Home directory not accessible: Permission denied
[[[[ HANGS HERE ]]]]

Set $HOME to /tmp in the Dockerfile allows things to work although there is still a permissions complaint:

docker run -u $(id -u) -it --cap-add SYS_ADMIN drawio-image drawio -x --crop infile.drawio -o outfile.pdf
Home directory not accessible: Permission denied
infile.drawio -> outfile.pdf

I'm not actually writing anything to the $HOME directory so my opinion is that draw.io should not require a writable $HOME directory to function.

@kanaka kanaka changed the title drawio command-line requires $HOME to be writable (sub-task of #127) drawio command-line requires $HOME to be writable Aug 10, 2019
@stale stale bot added the wontfix label Nov 26, 2020
@jgraph jgraph deleted a comment from stale bot Nov 28, 2020
@stale stale bot removed the wontfix label Nov 28, 2020
@davidjgraph davidjgraph added the notstale Stop the stale bot from processing label Nov 28, 2020
@davidjgraph davidjgraph removed the notstale Stop the stale bot from processing label Sep 29, 2023
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

3 participants