M4n0w4r 0 Denunciar post Postado Junho 5, 2010 Olá galera do bem :) Tenho um computador que a única coisa que ele faz é ser um servidor httpd no Linux, o usuario não pode ser um "daemon" (debaixo dos panos) pois eu preciso logar na máquina para iniciar e modificar os arquivos do mesmo. Posso rodar ele como um usuário normal que tem acesso a interface gráfica ? Que tipos de problemas com segurança eu posso ter ou evitar ? Obrigado. Compartilhar este post Link para o post Compartilhar em outros sites
João Batista Neto 448 Denunciar post Postado Junho 6, 2010 O usuário do httpd, normalmente, é o usuário apache do grupo apache, esse usuário não faz login no sistema e não deve fazer. Se você precisar modificar algum arquivo, utilize sudo: [neto@localhost html]$ ls -la total 8 drwxr-xr-x 2 apache apache 4096 Jun 6 09:41 . drwxr-xr-x. 8 root root 4096 Jun 6 09:41 .. [neto@localhost html]$ [neto@localhost html]$ mkdir teste mkdir: é impossível criar o diretório "teste": Permissão negada [neto@localhost html]$ sudo mkdir teste [neto@localhost html]$ ls -la total 12 drwxr-xr-x 3 apache apache 4096 Jun 6 09:43 . drwxr-xr-x. 8 root root 4096 Jun 6 09:41 .. drwxr-xr-x 2 root root 4096 Jun 6 09:43 teste [neto@localhost html]$ sudo chown apache.apache teste [neto@localhost html]$ ls -la total 12 drwxr-xr-x 3 apache apache 4096 Jun 6 09:43 . drwxr-xr-x. 8 root root 4096 Jun 6 09:41 .. drwxr-xr-x 2 apache apache 4096 Jun 6 09:43 teste [neto@localhost html]$ rmdir teste rmdir: falhou em remover "teste": Permissão negada [neto@localhost html]$ sudo rmdir teste [neto@localhost html]$ ls -la total 8 drwxr-xr-x 2 apache apache 4096 Jun 6 09:45 . drwxr-xr-x. 8 root root 4096 Jun 6 09:41 .. Como pode ver, não é necessário "logar" como um usuário do httpd, basta que você esteja na lista de sudoers. Compartilhar este post Link para o post Compartilhar em outros sites