From owner-freebsd-questions Fri Sep 12 18:27:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA24066 for questions-outgoing; Fri, 12 Sep 1997 18:27:38 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA24061 for ; Fri, 12 Sep 1997 18:27:33 -0700 (PDT) Received: (from grog@localhost) by freebie.lemis.com (8.8.7/8.8.5) id KAA24566; Sat, 13 Sep 1997 10:57:14 +0930 (CST) Message-ID: <19970913105714.09863@lemis.com> Date: Sat, 13 Sep 1997 10:57:14 +0930 From: Greg Lehey To: David Langford Cc: questions@FreeBSD.ORG Subject: Re: Hiding user directories without breaking ftp? References: <199709122324.NAA07029@caliban.dihelix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <199709122324.NAA07029@caliban.dihelix.com>; from David Langford on Fri, Sep 12, 1997 at 01:24:12PM -1000 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, Sep 12, 1997 at 01:24:12PM -1000, David Langford wrote: > > I am trying to get a system so that users can't "ls" other peoples > home directories. I've taken -isp off the list, since this doesn't have anything to do with ISPs. > The current problem is that this really breaks ftpd. > > It doesn't affect uploading to the directory, but when a user moves to a > subdirectory and then tries to back out, it goes all the way to the > server root directory. > > I set the dirs up like: > > drwxr-x--x 33 root nolist /u1 > drwxr-x--x 33 root nolist /u1/u > drwx--x--x 3 user user /u1/u/user > > PWD works like this. > > -r-xr-sr-x 1 bin nolist /bin/pwd > > Since ftpd setuid's the the incoming user then the getcwd() command doesnt > work. > > I would like to figure out a way for getpwd() to work but break "ls". I don't understand why you're doing things this way. It would suffice to set the permissions on the user directories, and this way you're making it impossible for anybody except root to find the directories. If you add read permission to /u1 and /u1/u, things should work OK. Greg