Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

I have installed apache from the source with:prefix=/usr sysconfdir=/etc/httpd/ localstatedir=/var.

useradd -g apache -d /usr/apache -s /sbin/nologin apache
share|improve this question
When installing things from source, generally you should use a prefix of /usr/local, to keep things separate from software provided by your OS. – jordanm Jan 13 '13 at 6:33
Yes, I know. This is a test, I am learning how to make distribution packages. – fdisk Jan 13 '13 at 7:21
up vote 1 down vote accepted

If you wonder about the home directory, it should not matter that much, because it will probably not change the behavior of apache at all.

On Debian, the default homedir for the user running apache is /var/www (which is the default DocumentRoot).

Also, if you're on a Debian-based distrib, you should prefer using adduser instead of useradd which is quite low level.

share|improve this answer
I am pretty sure adduser is a symlink to useradd in RHEL. The upstream for adduser in Debian, is actually Debian, so I would consider it Debian-specific. – jordanm Jan 13 '13 at 6:30
Corrected, thanks! – Totor Jan 13 '13 at 15:22

Your Answer


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.