We may earn a referral fee at no additional cost to you when you shop through the links on this page.
You set up an FTP account, the password is right, but the moment you connect the server hangs up with 421 Home directory not available - aborting. The login worked; the problem is what comes next. This DevAnswers guide explains the message and fixes it on a server you control, plus a note for cPanel shared-hosting users.
Before You Start
This guide assumes you have:
- Root or
sudoaccess to the Linux server running the FTP daemon (for the server-side fix). - The FTP username that is failing to log in.
- Shared-hosting readers: access to cPanel › FTP Accounts instead of a shell.
What “421 Home Directory Not Available” Means
The string 421 Home directory not available - aborting is emitted by Pure-FTPd, the FTP daemon that ships with cPanel and many Linux hosts. It appears after authentication succeeds: the username and password check out, but the server then tries to change into the user’s configured home directory and cannot. The usual reason is simply that the directory does not exist, so Pure-FTPd has nowhere to drop you and aborts the session. (ProFTPd shows a comparable “could not chdir” message for the same underlying problem.)
Because the failure is about the directory and not your credentials, no amount of password resetting will clear it. You fix it by making sure the home directory exists and that the FTP user is actually allowed to enter it.
Fix It on a Server You Control
If you have root or sudo access to the box, the fix takes four steps. First, confirm which FTP daemon is running so you restart the right service:
ps aux | grep ftp
You should see pure-ftpd in the output, confirming it is the daemon to restart later. Before you create anything, confirm the exact home directory the failing account is configured to use, so you fix the right path. For a normal system user it is the last-but-one field of their passwd entry:
getent passwd ftpuser
That prints a line like ftpuser:x:1002:1002::/home/ftpuser:/usr/sbin/nologin, where /home/ftpuser is the home directory Pure-FTPd will try to enter. (Pure-FTPd virtual users keep their path in the account record instead, viewable with pure-pw show ftpuser.) Now recreate that directory, give it to the FTP user, and set permissions that let the user enter it. Replace ftpuser and the path with the real account:
sudo mkdir -p /home/ftpuser
sudo chown ftpuser:ftpuser /home/ftpuser
sudo chmod 755 /home/ftpuser
The permission step is the part people miss. On a directory, the execute bit is what allows a user to enter it and reach the files inside; without it, the FTP daemon still cannot chdir even though the folder now exists. chmod 755 grants the owner read, write, and execute, and gives everyone else read and execute, which is the standard mode for a directory that needs to be traversable. If you want to lock it down further you can narrow the group and other bits later, but start with a directory the user can actually open.
It is also worth ruling out a plain ownership or permission clash on the files inside, which surfaces as a different error once you are past the 421. If a transfer is refused after login, see how to fix the vsftpd 550 permission denied error, and if you need to watch what the server is doing while you reconnect, the FTP server log location is the fastest way to see the rejected path.
With the directory in place, restart the daemon so it picks up a clean state:
sudo systemctl restart pure-ftpd
Reconnect and the 421 should be gone: Pure-FTPd can now enter the home directory and drops you into your session.
On Shared Hosting (cPanel)
On shared hosting you usually cannot SSH in to run mkdir, so the fix moves into the control panel. In cPanel › FTP Accounts, the Path (or Directory) column shows the home directory assigned to each FTP user. If that folder is missing, the simplest fix is to delete and recreate the FTP account so the panel provisions the directory for you, or to point the account at a path that already exists. Hosts such as Namecheap surface this same 421 for exactly that reason, and if the panel will not let you correct the path, their support team can recreate the directory server-side.
Summary
The FTP 421 Home directory not available - aborting error means authentication succeeded but the user’s home directory cannot be entered, almost always because it does not exist. On a server you control, create the directory, chown it to the FTP user, chmod 755 so the execute bit lets them in, then restart Pure-FTPd. On shared hosting, fix the path from cPanel › FTP Accounts or ask your host to recreate it.
Comments