首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Apache-Mina FTPServer问题-无法在使用数据库用户管理器时登录到apache ftp服务器。

Apache-Mina FTPServer问题-无法在使用数据库用户管理器时登录到apache ftp服务器。
EN

Server Fault用户
提问于 2013-02-07 15:29:09
回答 1查看 3K关注 0票数 2

在使用数据库用户管理器时,我无法将login插入apache服务器:当输入用户名和密码时,我在日志文件中得到以下错误:

代码语言:javascript
复制
[ INFO] 2013-02-07 20:51:07,779 [] [0:0:0:0:0:0:0:1] RECEIVED: USER piyush
[ INFO] 2013-02-07 20:51:07,781 [piyush] [0:0:0:0:0:0:0:1] SENT: 331 User name okay, need password for piyush.

[ INFO] 2013-02-07 20:51:07,784 [piyush] [0:0:0:0:0:0:0:1] RECEIVED: PASS *****
[ WARN] 2013-02-07 20:51:07,785 [piyush] [0:0:0:0:0:0:0:1] User failed to log in
[ WARN] 2013-02-07 20:51:08,285 [piyush] [0:0:0:0:0:0:0:1] Login failure - piyush
[ INFO] 2013-02-07 20:51:08,286 [piyush] [0:0:0:0:0:0:0:1] SENT: 530 Authentication failed.

[ INFO] 2013-02-07 20:51:08,286 [piyush] [0:0:0:0:0:0:0:1] RECEIVED: QUIT
[ INFO] 2013-02-07 20:51:08,290 [piyush] [0:0:0:0:0:0:0:1] SENT: 221 Goodbye.

[ INFO] 2013-02-07 20:51:08,291 [piyush] [0:0:0:0:0:0:0:1] CLOSED

下面是我的xml文件ftpd-ypical.xml:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
    <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
        contributor license agreements. See the NOTICE file distributed with
        this work for additional information regarding copyright ownership.
        The ASF licenses this file to you under the Apache License, Version
        2.0 (the "License"); you may not use this file except in compliance
        with the License. You may obtain a copy of the License at
        http://www.apache.org/licenses/LICENSE-2.0 Unless required by
        applicable law or agreed to in writing, software distributed under the
        License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
        CONDITIONS OF ANY KIND, either express or implied. See the License for
        the specific language governing permissions and limitations under the
        License.
    -->
<server xmlns="http://mina.apache.org/ftpserver/spring/v1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xsi:schemaLocation="
       http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd    
       "
    id="Prometheus">
    <listeners>
        <nio-listener name="default" port="2121" />
    </listeners>
    <db-user-manager encrypt-passwords="salted">
        <data-source>
            <beans:bean class="org.apache.commons.dbcp.BasicDataSource" >
                <beans:property name="driverClassName" value="com.mysql.jdbc.Driver" />
                <beans:property name="url" value="jdbc:mysql://localhost/apache_test" />
                <beans:property name="username" value="amy" />
                <beans:property name="password" value="piyush" />
            </beans:bean>
        </data-source>
        <insert-user>INSERT INTO FTP_USER (userid, userpassword,
            homedirectory, enableflag, writepermission, idletime, uploadrate,
            downloadrate) VALUES ('{userid}', '{userpassword}',
            '{homedirectory}',
            {enableflag}, {writepermission}, {idletime},
            {uploadrate},
            {downloadrate})
        </insert-user>
            <update-user>UPDATE FTP_USER SET
                userpassword='{userpassword}',homedirectory='{homedirectory}',enableflag={enableflag},writepermission={writepermission},idletime={idletime},uploadrate={uploadrate},downloadrate={downloadrate}
                WHERE userid='{userid}'
        </update-user>
            <delete-user>DELETE FROM FTP_USER WHERE userid = '{userid}'
        </delete-user>
            <select-user>SELECT userid, userpassword, homedirectory,
                enableflag, writepermission, idletime, uploadrate, downloadrate,
                maxloginnumber, maxloginperip FROM
                FTP_USER WHERE userid = '{userid}'
        </select-user>
            <select-all-users>SELECT userid FROM FTP_USER ORDER BY userid
        </select-all-users>
            <is-admin>SELECT userid FROM FTP_USER WHERE userid='{userid}'
                AND
                userid='admin'
        </is-admin>
            <authenticate>SELECT userpassword from FTP_USER WHERE
                userid='{userid}'</authenticate>
    </db-user-manager>
</server>
EN

回答 1

Server Fault用户

发布于 2013-10-29 21:29:40

这个问题不是因为passowrd,它可能是无效的用户名,所以在users.properties文件中检查您的用户名和密码。

文件: users.properties ftpserver.user.e101.userpassword=abs123 for

在这里,UserName=e101 Password=abs123

或ftpserver.user.admin.userpassword=21232F297A57A5A743894A0E4A801FC3表示此处,UserName=admin Password=XXXXXXXXXX

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/476461

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档