# Need advice for home directory of system user



## benpptung (Jan 8, 2012)

Normally, I create system user without home directory and login shell as following


```
#pw useradd phpwww -g phpwww -d /nonexistent -s /usr/sbin/nologin -c "php user for www use"
```

I am considering to assign a home directory to the above system user, since it is not a general user, any suggestion from a system admin view?

PS. it's another story why I want to assign a home directory to the PHP user. Because I am experiencing "connection-timeout" while connecting Paypal production server occasionally. I am trying to fix it, and thinking maybe the PHP system user lacks a home directory to store the SSL certificate which causes slow connection.


----------



## SirDice (Jan 9, 2012)

Just store it where all the other home directories are stored, in /usr/home/.


----------



## fluca1978 (Jan 9, 2012)

You can both change the user settings and assign a home directory like any other normal user (/usr/home) or can keep the home directory somewhere else (/var?) to emphasize this is not a _regular_ user. I tend to prefer the latter, even if this means my servers have double home-places.


----------



## anomie (Jan 9, 2012)

And, to throw a third option into the mix, you might consider creating /usr/home/sysacct and keeping that (and future system accounts) as children, a la /usr/home/sysacct/foo, /usr/home/sysacct/bar...


----------



## fonz (Jan 9, 2012)

As can be seen from the replies so far, it doesn't matter that much. Just make sure that the filesystem is mounted (usually at boot time, through /etc/fstab), that there's enough space and that the file permissions are properly set.

Fonz


----------



## benpptung (Jan 10, 2012)

Thanks for all the advices.


----------

