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

I need to update a ftp user's home directory. Could I run the userdel command then re-add the user without losing the directory the user was attached to? Or is there another way to change the user's directory?

I'm not using a chroot_list either...


share|improve this question
up vote 8 down vote accepted

You want to use the usermod command. You're going to want to use the -m and -d directives to modify their home directory and move its contents:

  -d, --home HOME_DIR
       The users new login directory.

       If the -m option is given, the contents of the current home
       directory will be moved to the new home directory, which is created
       if it does not already exist.

  -m, --move-home
       Move the content of the users home directory to the new location.

       This option is only valid in combination with the -d (or --home)
share|improve this answer
Thanks, that worked perfectly! – Spencer Aug 15 '11 at 19:15

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.