From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QrDej-0001dR-ED for garchives@archives.gentoo.org; Wed, 10 Aug 2011 18:37:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCF3721C120; Wed, 10 Aug 2011 18:37:15 +0000 (UTC) Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181]) by pigeon.gentoo.org (Postfix) with ESMTP id A84B821C091 for ; Wed, 10 Aug 2011 18:36:22 +0000 (UTC) Received: by vxi39 with SMTP id 39so1348712vxi.40 for ; Wed, 10 Aug 2011 11:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=ccSvkVEoMQvcuA6tg09HiALKnVQ8VYfNOaCKsqnQIC0=; b=YhDVrVwVSBGA3cQ6U/Y7nmG6WScrGcXFCj/AAIclWfvx/lQdaZof7THrF4WPUx0ZJB rw5zCJJp5OGSZGNoISkFKlYZweuVSW1nSdKToMtzk6aRkLIuqrsWgReNH0Zz3nnJbZ/l rHIgnd7kEmL4m15Iori1wV5kOCUq3mVsUWZLU= Received: by 10.52.23.225 with SMTP id p1mr4686382vdf.186.1313001382085; Wed, 10 Aug 2011 11:36:22 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: paul.hartman@gmail.com Received: by 10.52.166.197 with HTTP; Wed, 10 Aug 2011 11:36:02 -0700 (PDT) In-Reply-To: <4E42B3CE.3070004@gmail.com> References: <4E42B3CE.3070004@gmail.com> From: Paul Hartman Date: Wed, 10 Aug 2011 13:36:02 -0500 X-Google-Sender-Auth: lemFKazIxwT_mPVgZuZnw2NyHBY Message-ID: Subject: Re: [gentoo-user] vsftpd: how can I chroot both anon and auth users to the same dir? To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: X-Archives-Hash: 918eb29e91ec6125a9a0f58b37c75e7c On Wed, Aug 10, 2011 at 11:37 AM, Jarry wrote: > Hi, > I'm using vsftpd and I'm quite satisfied, except for one > problem which I can not solve: > > Anonymous users are chrooted to base ftp-server directory > /home/ftp but local users are chrooted to their own > directories /home/ftp/$USER and they can not move higher. > The only way for them to see directories of other local > users is to log-off and log-in as anonymous. This is not > very convenient. Why should authenticated user be allowed > less (in this particular aspect) than anonymous? > > So I'd like to change it the way that both anonymous > as well as local users are chrooted to base ftp directory > /home/ftp but I do not know how to do it. > > Whe I remove "chroot_local_users=YES" from vsftpd.conf, > local users are not chrooted at all, and can move > around the whole system up to /. And when I let that > "chroot_local_users=YES" activated, they are chrooted > to home-dirs. So how can I solve this problem? I haven't used vsftpd in a long time but I believe you can do something like this: Set user_config_dir to point to someplace such as /etc/vsftpd/users In that directory, create files for each username and within it put: local_root=/home/ftp I think that might set all of those users to login to that folder. I have not tried it. :) There was also an option to use alternative home directories rather than the one specified in /etc/passwd, but I can't remember exactly what that was and it may have still used the username as part of the path. "man vsftpd.conf" should explain it.