From owner-freebsd-questions Sun Oct 10 9:32:30 1999 Delivered-To: freebsd-questions@freebsd.org Received: from smtp.safepages.com (smtp.safepages.com [192.41.32.27]) by hub.freebsd.org (Postfix) with ESMTP id 0858B15668 for ; Sun, 10 Oct 1999 09:31:04 -0700 (PDT) (envelope-from jason@welsh.dynip.com) Received: from welsh.dynip.com (03-122.038.popsite.net [209.198.10.122]) by smtp.safepages.com (8.8.5) id KAA08482; Sun, 10 Oct 1999 10:31:00 -0600 (MDT) X-Authentication-Warning: smtp.safepages.com: Host 03-122.038.popsite.net [209.198.10.122] claimed to be welsh.dynip.com Received: (qmail 20839 invoked by uid 1000); 10 Oct 1999 16:30:26 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 10 Oct 1999 16:30:26 -0000 Date: Sun, 10 Oct 1999 12:30:26 -0400 (EDT) From: jason To: cjclark@home.com Cc: Sheldon Hearn , freebsd-questions@FreeBSD.ORG Subject: Re: hiding directories on ftp server In-Reply-To: <199910101546.LAA28129@cc942873-a.ewndsr1.nj.home.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ok, i think is see whats going on.. I finally got it to work.. by using what he suggested... having /pub/arb/leech and when I applied the same thing to /pub/leech I ended up not being able to see what was in pub.. so I guess its an all or nothing.. either see all directories and files in a given directory or see no files and directories in a given directory.. you cant mix and match hidden files and directories in a given directory... if that makes any sense? ;) -- ======================================================================= | Jason Welsh jason@welsh.dynip.com | If you think there's | | | good in everybody, you | | http://welsh.dynip.com/ | haven't met everybody. | ======================================================================= On Sun, 10 Oct 1999, Crist J. Clark wrote: > jason wrote, > > On Sun, 10 Oct 1999, Sheldon Hearn wrote: > > > On Sat, 09 Oct 1999 15:56:27 -0400, jason wrote: > > > > > > > I wanted the directory to not be visible (as well as the files in it).. > > > > > > So apply your brain to the problem and take it one step further. :-) > > > > > > You already know that removing read permission on a directory makes its > > > contents invisible, right? So: > > > > > > cd /path/to/ftp/directory > > > mkdir arb > > > chmod 751 arb > > > mkdir arb/leech > > > chmod 751 arb/leech > > > > > > If your ftp users are in the group of the user creating these > > > directories, then you should use mode 711 instead of 751. > > > > > > Ciao, > > > Sheldon. > > > > > > PS: You could simplify the commands above, but I wanted to make sure you > > > understand what's happening. > > > > > > > i must be doing something horribly wrong.. > > ive set the pub/leech dir to be chmod 100 > > any I can still see that directory from a windows98 machine running its > > dos ftp program... heres the ls -al from the dos box > > d-wx------ 2 root operator 512 Oct 8 21:33 leech > > I dont think I have my ftp user has root priveleges.. > > is this weird or am i just totally missing something? > > > > thanks for being patient with me.. ;) > > Sheldon's suggestion was to put an unreadable (one that cannot be > 'ls'ed), but executable (files in it can be accessed) directory in > between the 'pub' directory and the 'leech' directory. In your reply, > you indicate that you are still putting 'leech' in the readable 'pub' > directory. > > Doing something along the lines of what Sheldon suggested, I ftp'ed > into my machine to get a file 'junk' that is hiding up in 'leech,' > > ftp> ls > 200 PORT command successful. > 150 Opening ASCII mode data connection for '/bin/ls'. > total 1 > drwx--x--x 3 cjc ftp 512 Oct 10 11:33 arb > 226 Transfer complete. > ftp> ls arb > 200 PORT command successful. > 150 Opening ASCII mode data connection for '/bin/ls'. > ls: arb: Permission denied > 226 Transfer complete. > ftp> cd arb > 250 CWD command successful. > ftp> ls > 200 PORT command successful. > 150 Opening ASCII mode data connection for '/bin/ls'. > ls: .: Permission denied > 226 Transfer complete. > ftp> cd arb > 250 CWD command successful. > ftp> ls > 200 PORT command successful. > 150 Opening ASCII mode data connection for '/bin/ls'. > ls: .: Permission denied > 226 Transfer complete. > ftp> pwd > 257 "/usr/home/ftp/pub/arb" is current directory. > ftp> cd leech > 250 CWD command successful. > ftp> ls > 200 PORT command successful. > 150 Opening ASCII mode data connection for '/bin/ls'. > ls: .: Permission denied > 226 Transfer complete. > ftp> pwd > 257 "/usr/home/ftp/pub/arb/leech" is current directory. > ftp> get junk > local: junk remote: junk > 200 PORT command successful. > 150 Opening BINARY mode data connection for 'junk' (5 bytes). > 100% |**************************************************| 5 00:00 ETA > 226 Transfer complete. > 5 bytes received in 0.00 seconds (6.44 KB/s) > > Does that not work like you would want? I cannot ls the contents of > arb or leech, but can grab files from them (or chdir in them) if I > know the filename. > -- > Crist J. Clark cjclark@home.com > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message