Subject: FTP Commands at logon

From: "Durham, Kenneth J" <[email-masked]>
Date: Wed, 31 Mar 1999 14:15:56 -0800

Now that i have the users dir fixed.  (By the way thank you everyone! ) How
can i have the ftp do some commands when a user logs in.  I would like ftp
to change the dir that the user is in to a diffrent dir in there dir.  
/                       users root dir
/public_html      dir that i want them to be changed to once they login
 
is there anyway that i can add a script when they logon just does a 
cd public_html?
 
thanks for all your help

---

From: "Alex Yu" <[email-masked]>
Date: Wed, 31 Mar 1999 17:28:30 -0500

> can i have the ftp do some commands when a user logs in.  I

Edit passwd file.  Change :/: to :/./public_html:.

Alex

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 31 Mar 1999 17:55:35 -0500 (EST)

On Wed, 31 Mar 1999, Durham, Kenneth J wrote:

> Now that i have the users dir fixed.  (By the way thank you everyone!
> ) How can i have the ftp do some commands when a user logs in.  I
> would like ftp to change the dir that the user is in to a diffrent dir
> in there dir.
> 
>   /              users root dir
> is there anyway that i can add a script when they logon just does a cd
> public_html?

When you're using classic wu-ftpd, you can change this in the passwd file.
In a VR upgrade, if you're using 'guest-root' you change it in the passwd
file inside the root area.

In all cases, this only sort-of works.  Netscape and IE users won't see
the effect because of the way the web browsers handle FTP URLs.

There's a fix, though .. well sorta ..

Upgrade to VR17 (tomorrow), then use 'restricted-uid' to lock them into
their 'home' .. /public_html, in your case.  Not only are they cd'd there,
they can't seem to leave it.  In effect, it's a "soft" chroot.  The daemon
rewrites all requests to try to keep them inside their homes.  As the man
page says, though, don't _depend_ upon this working .. make them guests so
your system is safe, _then_ restirct them to their homes.  It's your own
damned fault if you didn't chroot your users and they break out of the
restriction to their home directory to wreck havok on your system.

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195