I would like to set the home directory for ftpuser to root. That's my command:
# adduser ftproot -shell /bin/false -home /var/www
What is the directory term for root?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
First of all it is indeed a bad idea to use the homedirectory of root for other purposes. Consider a dedicated home directory for the new user, root is always able to access it.
Are you indeed looking for setting the homedirectory of the ftp user to the homedirectory of the superuser root or are you looking for a way to safely specify a FTP root (jailed or similar) to isolate the ftp account?
Next, the arguments -shell and -home needs an additional - (--shell, --home). See also
If you still want to do so, you must ensure that the new user gets access to the homedirectory of root.
Get the current homedirectory of root using
getent passwd root. The homedirectory is specified in the 6th field (often /root).
--home /root in your command to specify the homedirectory.