Pure-FTPD chroot not working on a fresh Debian install?

I am trying to get chroot to work with virtual Pure-FTPD users, but for some reason it simply is not working.

I changed the following options:

/etc/default/pure-ftpd-common:

VIRTUALCHROOT=true

/etc/pure-ftpd/conf/ChrootEveryone:

yes

And added a virtual user with a homedirectory, which shows like this:

Login              : <someuser>
Password           : <foo>
UID                : 1003 (ftpuser)
GID                : 1003 (ftpgroup)
Directory          : /home/<homedir>/./

What am I missing here?


Solution 1:

Try set VIRTUALCHROOT=false and "/./" from user home dir.

/etc/default/pure-ftpd-common:

VIRTUALCHROOT=false

cat /etc/pure-ftpd/conf/ChrootEveryone:

yes

When restart, exist -A option:

/etc/init.d/pure-ftpd restart Restarting ftp server: Running: /usr/sbin/pure-ftpd -l pam -O clf:/var/log/pure->ftpd/transfer.log -u 1000 -E -A -8 UTF-8 -B

/etc/passwd:

test:x:1001:1001::/home/test:/bin/sh

Chroot work:

# ftp localhost
Connected to localhost.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 11:03. 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 (localhost:ooshro): test
331 User test OK. Password required
Password:
230-User test has group access to:  test      
230 OK. Current restricted directory is /
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful
150 Connecting to port 40034
226-Options: -l 
226 0 matches total