Heres a templates way to achieve this, you really only need to add a line in the proftpd config file, but this way you could add an option to account/ibay creation etc if you wanted to go that far
ignoring below add the line
DefaultRoot user
for each user/ibay to lock
Or drop the following fragment into /etc/e-smith/templates-custom/etc/proftpd.conf
eg.
sudo mkdir /etc/e-smith/templates-custom/etc/proftpd.conf
cat < /etc/e-smith/templates-custom/etc/proftpd.conf/05Chroot
{
my %accounts;
tie %accounts, 'esmith::config', '/home/e-smith/accounts';
my $key;
my $value;
$OUT .= "# Chrooted users and ibays\n";
while (($key,$value) = each %accounts)
{
my ($type, %properties) = split (/\|/, $value, -1);
if ($type eq 'user' or $type eq 'ibay')
{
if (defined($properties{'chroot'}) and
$properties{'chroot'} eq 'yes')
{
$OUT .= "DefaultRoot\t";
$OUT .= "/home/e-smith/files/" . "$type" . "s/$key";
$OUT .= "\t$key\n";
}
}
}
}
EOF
Then you can specify who to lock by
sudo /sbin/e-smith/db accounts setprop username/ibay chroot yes/no
then expand the template
sudo /sbin/e-smith/expand-template /etc/proftpd.conf
for eg.
--
Damien