March 24

pure-ftpd Can’t change directory to /var/ftp/

The problem arises when a user attempts to make an anonymous FTP connection to Cpanel user’s account who has already enabled anonymous FTP connections in their control panel. However, pure-ftpd drops you with the error “421 Can’t change directory to /var/ftp/”.

workstation:~ user$ ftp
Connected to
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 3 of 50 allowed.
220-Local time is now 11:02. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name ( anonymous
421 Can't change directory to /var/ftp/ [/]
ftp: Login failed.

The solution(s):
1. Use and any password instead of just anonymous
2. Assign the Cpanel user a dedicated IP address where FTP logins with just “anonymous” will work.

Copyright © 2014. All rights reserved.

Posted March 24, 2010 by admin in category Cpanel, Hosting, Linux

2 thoughts on “pure-ftpd Can’t change directory to /var/ftp/

  1. Barney

    I tried Solution 1. Didn’t work. Checking with the host admin for some help.

    Points about solution 1.
    1) How do you specify the domain twice in a browser on a URL like ftp://user:pwd@domain:port ?
    2) Can you single-quote or double-quote [user] and [pwd]?

    Feel free to respond to my email directly and delete my comment.


Leave a Comment

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>