Running supervisord process as root

6,314

In your program config (program:doStaff) add this line:

user=root
Share:
6,314

Related videos on Youtube

guystart
Author by

guystart

Updated on September 18, 2022

Comments

  • guystart
    guystart over 1 year

    My goal is to run sudo inside one of the programs:

    [program:doStaff]
    command=sudo python manage.py doStaff
    autostart=true
    autorestart=true
    stderr_logfile=/var/log/doStaff.err.log
    stdout_logfile=/var/log/doStaff.out.log
    

    Here is [unix_http_server] from supervisord.conf:

    [unix_http_server]
    file=/var/run/supervisor.sock  
    chmod=0770   
    

    Tried to set the supervisord user to root inside supervisord.conf but it didn't help.

    I am trying to run this process as root since this script deletes some files in the system.