[plug] proftpd and mysql

James Devenish devenish at guild.uwa.edu.au
Mon Oct 13 15:51:13 WST 2003


In message <1066030546.5716.175.camel at phoenix>
on Mon, Oct 13, 2003 at 03:35:47PM +0800, Adam Hewitt wrote:
> I would like to be able to have users ftp into my server and have a user
> ftp to ftp.doamin.com and use the username of ftp.domain.com with
> password password1 and have them log into /var/www/www.domain.com/ but
> at if they use username1 and password1 then it will log them into
> /home/username1/public_html
> 
> Without actually creating two usernames with the same password, is it
> possible to have the /var/www/blah section as another column in the
> users table and get proftpd to read it?

1/ What version of proftpd are you talking about? MySQL version?

2/ Yes. This can be done in the database or with proftpd. Let's go with
proftpd since MySQL probably won't do quite what you want.

3/ Go ahead and draw up a standard mod_sql_mysql userinfo table but add
a domainname column for obvious reasons. Populate. Construct a custom
query string ("SELECT ...") with the clause '( username=%U OR
domainname=%U )' instead of the default 'username=%U' (THIS IS A GUESS).
Configure mod_sql_mysql to use this query string instead of rolling its
own. Relevant directives might include "SQLUserInfo custom:/mything" and
"SQLNamedQuery mything SELECT '...'".



_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list