FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Passing a UID is not working · Issue #268 · extrabacon/python-shell · GitHub

Repository navigation

Passing a UID is not working #268

Description

The Question:
I am trying to pass UID: 0 to the Python Shell in order to execute my script as root as recommended in #41 . But this only results in the following error:

Uncaught Exception:
Error: spawn EPERM
at ChildProcess.spawn (node:internal/child_process:412:11)
at spawn (node:child_process:707:9)
at new PythonShell (/home/pi/Desktop/app/node_modules/python-shell/index.js:127:55)
at Function.run (/home/pi/Desktop/app/node_modules/python-shell/index.js:249:23)
at IpcMainImpl. (/home/pi/Desktop/app/main.js:100:17)
at IpcMainImpl.emit (node:events:390:28)
at EventEmitter. (node:electron/js2c/browser_init:161:10780)
at EventEmitter.emit (node:events:390:28)

I am using the following code:

PythonShell.run(arg, {uid: 2}, function(err, results){
});

Is there any way to run the child process with sudo privileges?

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL