Allow user other than root to restart supervisorctl process?

Stavros Korokithakis

I have supervisord run a program as user stavros, and I would like to give the same user permission to restart it using supervisorctl. Unfortunately, I can only do it with sudo, otherwise I get a permission denied error in socket.py. How can I give myself permission to restart supervisord processes?

Didier Spezia

Personally, I think it is a bad idea to run supervisord as root, but if you want to do this, while allowing a full restart by other users, here is how I would do it.

1/ Create a supervisor group on your system which will have restart rights on supervisord

2/ Put the relevant users in group supervisor

3/ In the supervisord configuration, use the following lines in the [unix_http_server] section:

chmod=0770                 ; socket file mode (default 0700)
chown=root:supervisor      ; socket file uid:gid owner

It will guarantee that the admin socket is accessible from the selected users.

4/ Add supervisord in the init mechanism of your system in respawn mode (init, systemd, upstart, etc ...). It depends on your system. Respawn mode means the process will be automatically relaunched if it crashes or stops.

5/ From one of the selected users, you should be able to use supervisorctl to run commands, including a complete shutdown which will trigger a full restart of supervisord.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Is it possible to make users subordinate to a user other than root in Linux?

분류에서Dev

Allow non-root process to bind to port 80 and 443?

분류에서Dev

What circumstances other than "await" will allow synchronous code to be interrupted

분류에서Dev

unix process run as root even though start from other users

분류에서Dev

unix process run as root even though start from other users

분류에서Dev

Can't connect to another user than root through SSH

분류에서Dev

Global SSH key, working for root user but not for other users

분류에서Dev

Why does a process of a binary with only execute permission remain hidden in "ps" when using hidepid=2, if the user is not root?

분류에서Dev

MariaDB root user

분류에서Dev

How to NOT become a root user? Are administrators root?

분류에서Dev

How to invoke NetBeans asking the user for a restart?

분류에서Dev

Responding to URL other than Google

분류에서Dev

Linux -more than one root account

분류에서Dev

How to kill process of another user?

분류에서Dev

What is an example of an "external user process"?

분류에서Dev

How to allow user input of numbers and operators?

분류에서Dev

Allow User to Change Font and Boldness in Description

분류에서Dev

Allow DISPLAY access for a user not logged on GUI

분류에서Dev

Allow chown command to www-data user

분류에서Dev

root가 아닌 사용자가 supervisorctl 프로세스를 다시 시작하도록 허용 하시겠습니까?

분류에서Dev

Django - View Other user profile

분류에서Dev

Making a specific root folder accessible to user

분류에서Dev

What Is The Difference Between "root", "user", "group"?

분류에서Dev

Exit from both root and user with one command

분류에서Dev

how to enable root user in linux(Ubuntu)?

분류에서Dev

Where is the bash history for the root user saved?

분류에서Dev

Failing to start IBM Http server with root user

분류에서Dev

pushing messages as root to user using startx

분류에서Dev

Xen libvirt access for non-root user

Related 관련 기사

  1. 1

    Is it possible to make users subordinate to a user other than root in Linux?

  2. 2

    Allow non-root process to bind to port 80 and 443?

  3. 3

    What circumstances other than "await" will allow synchronous code to be interrupted

  4. 4

    unix process run as root even though start from other users

  5. 5

    unix process run as root even though start from other users

  6. 6

    Can't connect to another user than root through SSH

  7. 7

    Global SSH key, working for root user but not for other users

  8. 8

    Why does a process of a binary with only execute permission remain hidden in "ps" when using hidepid=2, if the user is not root?

  9. 9

    MariaDB root user

  10. 10

    How to NOT become a root user? Are administrators root?

  11. 11

    How to invoke NetBeans asking the user for a restart?

  12. 12

    Responding to URL other than Google

  13. 13

    Linux -more than one root account

  14. 14

    How to kill process of another user?

  15. 15

    What is an example of an "external user process"?

  16. 16

    How to allow user input of numbers and operators?

  17. 17

    Allow User to Change Font and Boldness in Description

  18. 18

    Allow DISPLAY access for a user not logged on GUI

  19. 19

    Allow chown command to www-data user

  20. 20

    root가 아닌 사용자가 supervisorctl 프로세스를 다시 시작하도록 허용 하시겠습니까?

  21. 21

    Django - View Other user profile

  22. 22

    Making a specific root folder accessible to user

  23. 23

    What Is The Difference Between "root", "user", "group"?

  24. 24

    Exit from both root and user with one command

  25. 25

    how to enable root user in linux(Ubuntu)?

  26. 26

    Where is the bash history for the root user saved?

  27. 27

    Failing to start IBM Http server with root user

  28. 28

    pushing messages as root to user using startx

  29. 29

    Xen libvirt access for non-root user

뜨겁다태그

보관