Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

got questions of unsuccessful searches

1 - Why almost every software should run with its own user, is so simple run everything with a single user, why no one do that ?

2 - Why can't I just set the home dir to "/dev/null" and the shell login to "/sbin/nologin" for everyone ?

mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash # Mysql
nginx:x:493:489:Nginx user:/var/lib/nginx:/bin/false # Nginx
nobody:x:99:99:Nobody:/:/sbin/nologin # Php-fpm

Why so many alternatives, why its so confused, I can't understand, WHY, WHY, WHY ?

Thanks O.o

share|improve this question
up vote 2 down vote accepted

1 - it's for security. f.e. if apache runs as its own user and someone hacks the apache, he could not controle mysql and he could not read others dirs, because the apache user has only rights for apache and it's directories.

2 - mysql is running as user "mysql". some daemons, like for mysql, need to start other programms or daemons etc. and for this it needs a valid shell. and mysql have to read the files in the home dir also. it's all about security :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.