Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

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.