CreateHomeDir doesn't work with my Pure-FTP install

Discussion in 'HOWTO-Related Questions' started by todgerme, Jan 31, 2012.

  1. todgerme

    todgerme Member

    I've followed the Debian Lenny howto and I can't get auto creation of home directories to work. This is actually an old problem but I need to get it resolved as it's never worked for me in any Debian from Sarge - Squeeze!

    The user in the MYSQL database is say /ftp/directory with ftpuser:ftpgroup as UID:GID

    The /ftp directory is owned by ftpuser:ftpgroup

    If /ftp/directory doesn't exist, the login fails with:

    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    220-You are user number 1 of 50 allowed.
    220-Local time is now 17:32. Server port: 21.
    220-This is a private system - No anonymous login
    220-IPv6 connections are also welcome on this server.
    220 You will be disconnected after 15 minutes of inactivity.
    Name (80.95.186.225:root): exampleuser
    331 User exampleuser OK. Password required
    Password:
    421 Service not available, remote server has closed connection
    Login failed.
    No control connection for command: No such file or directory

    If I create the directory it works fine assuming I put the right permissions on the directory.

    root@vs:/# cat /etc/pure-ftpd/conf/CreateHomeDir
    yes

    The FTP server is inside an openvz virtual container but even installs not within the virtual container don't work either for me. Everything else works fine, for example chroot.

    How can I debug why the server won't create directories? Does it need certain commands available for example?

    This is what syslog says:

    Jan 31 17:30:28 vs pure-ftpd: (?@) [ERROR] Home directory not available - aborting
     
    Last edited: Jan 31, 2012
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you try this on the host system?

    Code:
    VPSID=101
    for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
    do
      vzctl set $VPSID --capability ${CAP}:on --save
    done 
    Make sure you use the correct container ID.
     

Share This Page