*BSD News Article 77725


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!newsfeed.internetmci.com!in2.uu.net!brighton.openmarket.com!wizard.pn.com!Germany.EU.net!Dortmund.Germany.EU.net!interface-business.de!usenet
From: j@ida.interface-business.de (J Wunsch)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: FTP and hidden directories...
Date: 7 Sep 1996 23:05:16 GMT
Organization: interface business GmbH, Dresden
Lines: 53
Message-ID: <50sv3c$92t@innocence.interface-business.de>
References: <50mocp$e2@canton.charm.net>
Reply-To: joerg_wunsch@interface-business.de (Joerg Wunsch)
NNTP-Posting-Host: ida.interface-business.de
X-Newsreader: knews 0.9.6
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

snowdog@charm.net (Sean Rolinson) wrote:

> One of our users would like to be able to hide a directory (remove 'r'
> bit) but allow people to 'cd' to it if they know the name of the
> directory. [...] Is there a way to fix this?  

Seems to work for me:

ftp> cd pub 
250 CWD command successful.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 12838
d--x--x--x  3 ftp  guest      512 Sep  8 00:57 foo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here...
226 Transfer complete.
ftp> dir foo
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
ls: foo: Permission denied
226 Transfer complete.
ftp> cd foo/bar
250 CWD command successful.
ftp> put backup   
local: backup remote: backup
200 PORT command successful.
150 Opening BINARY mode data connection for 'backup'.
226 Transfer complete.
1352 bytes sent in 0.00 seconds (1.19 Meg/s)
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 4
-rw-r--r--  1 ftp  guest  1352 Sep  8 01:02 backup
226 Transfer complete.
ftp> bye
221 Goodbye.

As you can see, if i know that it's foo/bar, i can CD there, and can
upload there.

> Secondly,  when someone anonymously uploads a file to a user's
> directory, that file has the userid of the FTP account.  Is there a
> way to made that file belong to the user who's directory it was
> uploaded to?  

Get wuftpd for this.

-- 
J"org Wunsch					       Unix support engineer
joerg_wunsch@interface-business.de       http://www.interface-business.de/~j