Answer the question
In order to leave comments, you need to log in
How to run python script as root?
Hello. There is a server on Centos 7. A python script is spinning on it. On reboot, the script rises, but does not work.
In cron, a task is triggered every 5 minutes. The meaning is this. If there is no given name in ps, then we start a script of the type. nohup python /root/rtl/script.py &
When output ps aux | grep script
, it shows that it is running as root, there is pid, but the script does not show any activity. When run from the console or from the terminal, everything works as it should. What is the reason or what am I doing wrong.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question