2

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?

2
  • Can you describe exactly what is not working? Is the user able to login but just not chrooted?
    – pablo
    Mar 2, 2011 at 10:58
  • @pablo that is exactly the case as mentioned in the title. Login works, chroot does not. Mar 2, 2011 at 11:19

2 Answers 2

2

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
2
0

Solved it.

Turned out my FTP server was running through inetd instead of standalone.

When configured in inetd mode, the conf dir seems to be ignored.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .