0

I'm writing a little Python program with a main.py and a packet called backend.

Now I want to protect the packet from accessing it but make it usable from the main.py with a normal user like AppUser without sudo and something like that.

How can I solve this problem?

marked as duplicate by Mokubai Mar 26 '18 at 6:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Thanks for the quick reply. It's close to my question but not realy the answere I'm searching not for encryption. I only want to protect on file, which is in the paket, with login data in it. Is there no solution from Linux like the user privilliges or something like that? – MarvinMcFly Mar 26 '18 at 6:38
  • In order to execute the file they need to be able to read it. The only way to do this would be to wrap up your backend as some kind of http server and put it on a secure machine, file permissions won't help here. – Mokubai Mar 26 '18 at 6:46
  • To be clear, you can probably create a new user that runs your backend and secure the backend under that user and block access to your file to all other users, but that would still require you to do programming work to make the backend accessible. We cannot know how your program works or if this is even workable for you. Programming questions are off topic here so we can't help you with that side of things. – Mokubai Mar 26 '18 at 8:08