Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

169
Visualizações
Allow users to reload PHP FPM without Sudo

On our development servers, we allow multiple developers access to the server to git pull their changes. Normally this requires running sudo systemctl reload php-fpm (or sending USR2, etc.). However, we want to allow them to reload the changed code in PHP-FPM without needing sudo.

Way back when when I used to use Ruby, you could do exactly what I'm looking for by touching a file named restart.txt in the tmp directory.

Does PHP-FPM support anything like that? Alternatively, is there anyway to allow the reload command (or any similar method of sending a USR2) without sudo?

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You'll probably be there when whitelisting the command in your /etc/sudoers file:

Start by editing the sudoers file:

sudo visudo

Add the following config line:

user ALL=(root) NOPASSWD: systemctl reload php-fpm

Replace user (at the beginning of the line) with the real username, for whom the command is executed.

This will privilege the user to call sudo systemctl reload php-fpm being executed as root (without password).

about 4 years ago · Santiago Trujillo Relatório

0

Or one can use:

user ALL=(ALL) NOPASSWD: /usr/sbin/service php7.3-fpm *

Where 7.3 might change depending on the php version you have and user is your user.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda