incubator-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rana Bhattacharyya <ran...@yahoo.com>
Subject Re: Apache FTP Server
Date Wed, 19 Oct 2005 06:19:37 GMT
Hi,

   It is true that we have changed the column names
for consistency but you can still use your old table.
The only thing you have to do is to change the
queries. This is the column mapping (OLD -> NEW):

LOGIN_ID      -> uid
PASSWORD      -> userpassword
HOME_DIR      -> homedirectory
ENABLED       -> enableflag
WRITE_PERM    -> writepermission
IDLE_TIME     -> idletime
UPLOAD_RATE   -> uploadrate
DOWNLOAD_RATE -> downloadrate

If you want to use your old table with the new FTP
server, you need to use the following queries.

sql-user-insert
---------------
INSERT INTO FTP_USER 
(LOGIN_ID, PASSWORD, 
 HOME_DIR, ENABLED, 
 WRITE_PERM, IDLE_TIME, 
 UPLOAD_RATE, DOWNLOAD_RATE) 
VALUES 
('{uid}', '{userpassword}', 
 '{homedirectory}', '{enableflag}', 
 '{writepermission}', {idletime}, 
  {uploadrate}, {downloadrate})

sql-user-update
---------------
UPDATE FTP_USER SET 
  PASSWORD='{userpassword}',
  HOME_DIR='{homedirectory}',
  ENABLED='{enableflag}',
  WRITE_PERM='{writepermission}',
  IDLE_TIME={idletime},
  UPLOAD_RATE={uploadrate},
  DOWNLOAD_RATE={downloadrate} 
WHERE LOGIN_ID='{uid}'

sql-user-delete
---------------
DELETE FROM FTP_USER WHERE LOGIN_ID = '{uid}'

sql-user-select
---------------
SELECT 
  LOGIN_ID uid, 
  PASSWORD userpassword, 
  HOME_DIR homedirectory, 
  ENABLED enableflag, 
  WRITE_PERM writepermission, 
  IDLE_TIME idletime, 
  UPLOAD_RATE uploadrate, 
  DOWNLOAD_RATE downloadrate 
FROM FTP_USER 
WHERE LOGIN_ID = '{uid}'

sql-user-select-all
-------------------
SELECT LOGIN_ID uid 
FROM FTP_USER 
ORDER BY LOGIN_ID

sql-user-authenticate
---------------------
SELECT LOGIN_ID 
FROM FTP_USER 
WHERE 
  LOGIN_ID='{uid}' AND 
  PASSWORD='{userpassword}'

sql-user-admin
--------------
SELECT LOGIN_ID 
FROM FTP_USER 
WHERE LOGIN_ID='{uid}' AND 
LOGIN_ID='admin'


I have copied the mail to the mailing lists because
all the FTP server related mail should be directed to
the mailing list so that we can get feedback from
other developers.

Thanks,
Rana Bhattacharyya


--- Marek Novotný <marek.novotny@siemens.com> wrote:

> Hello,
>  
>  I used the old version of your FTPServer in my
> project and I want to
> upgrade to Apache FTP Server incubator. 
>  
> I made a new configuration based on my old
> configuration and existing
> database table FTP_USER with different column names
> from current version of
> ftp-db.sql file. 
>  
> The problem is that I can't login to FTP server with
> admin user, because
> there is thrown SQLException, that reports nonexist
> column uid.
> What does it mean for my situation? Do I have to
> rename my table columns to
> new names? Is it bug or feature, that I must use the
> column names like they
> are defined in
> org.apache.ftpserver.usermanager.BaseUser class?
>  
> The report of SQLException is followed:
> [2005-10-18T14:37:39] (INFO) Open connection -
> 1.2.3.4
> [2005-10-18T14:37:39] (INFO) SELECT LOGIN_ID from
> FTP_USER WHERE
> LOGIN_ID='admin
> ' AND PASSWORD='admin'
> [2005-10-18T14:37:39] (INFO) SELECT LOGIN_ID,
> PASSWORD, HOME_DIR, ENABLED,
> WRITE
> _PERM, IDLE_TIME, UPLOAD_RATE, DOWNLOAD_RATE FROM
> FTP_USER WHERE LOGIN_ID=
> 'admi
> n'
> [2005-10-18T14:37:39] (ERROR)
> DbUserManager.getUserByName()
> java.sql.SQLException: Column 'uid' not found.
>         at
>
com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:910)
>         at
>
com.mysql.jdbc.ResultSet.getString(ResultSet.java:4942)
>         at
>
org.apache.ftpserver.usermanager.DbUserManager.getUserByName(DbUserManager.j
> ava:270)
>         at
>
org.apache.ftpserver.command.PASS.populateUser(PASS.java:177)
>         at
>
org.apache.ftpserver.command.PASS.execute(PASS.java:127)
>         at
>
org.apache.ftpserver.RequestHandler.service(RequestHandler.java:269)
>         at
>
org.apache.ftpserver.RequestHandler.run(RequestHandler.java:236)
>         at java.lang.Thread.run(Thread.java:534)
> [2005-10-18T14:37:39] (INFO) Close connection :
> 163.242.116.87 - admin
>  
> Marek Novotný
> marek.novotny@siemens.com
> tel. +420 543 10 6210 
>  
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@incubator.apache.org
For additional commands, e-mail: general-help@incubator.apache.org


Mime
View raw message