Current time: 05-09-2024, 05:21 AM Hello There, Guest! (LoginRegister)


Post Reply 
FTP - Can not open directory!
Author Message
renew Offline
Newbie
*

Posts: 5
Joined: Dec 2010
Reputation: 0
Post: #1
Question FTP - Can not open directory!
Hallo,
Ich bin neu hier und habe auch gleich mal eine Frage zu einem Problemchen welches bei mir auftritt. Vorab - Ich habe die Suche benutzt und auch auf einige Threads gestoßen, welche ein ähnliches Problem beinhalten. Ich bin dabei auf folgenden Link gestolpert. Ich werde daraus aber nicht schlau bzw. weiß ich nicht wo das Problem liegt.

Zu meinem Problem:

Ich kann einfach keine FTP-Zugänge einrichten, wenn ich das Verzeichnis angeben möchte. (siehe Bild 1)
   

Egal ob ich als Admin, Reseller oder Kunde eingeloggt bin - es kommt immer diese Meldung.

Komisch ist aber folgendes: Wenn ich kein Verzeichnis auswähle (also nur benutzername und passwort angebe) erstellt ispCP einen Account (zumindest wird er dann unter "FTP-Zugänge" angezeigt).

Wenn ich dann aber versuche mich über den Dateimanager mit diesem angelegten Account einzuloggen (habe es auch schon mit einem FTP-Programm versucht) kommt folgende Meldung (siehe Bild 2)
   

Ich bin mir ganz sicher die richtigen Logindaten benutzt zu haben!

Meine Vermutung:
{blabla} ist doch ein Platzhalter, oder? Ich denke das hier in irgend einer Datei Angaben dazu fehlen.

Was ich bisher probiert habe:
- Komplette neuinstallation von ispCP -> hat nichts gebracht

Hat einer von euch eine Idee?

edit//
- proftpd läuft
Code:
8160 proftpd   20   0 64228 1560  592 S  0.0  0.3   0:00.02 proftpd
- proftpd.conf
Code:
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#

# Includes DSO modules
Include /etc/proftpd/modules.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6                on
# If set on you can experience a longer connection delay in many cases.
IdentLookups            off

ServerName            "Debian"
ServerType            standalone
DeferWelcome            off

MultilineRFC2228        on
DefaultServer            on
ShowSymlinks            on

TimeoutNoTransfer        600
TimeoutStalled            600
TimeoutIdle            1200

DisplayLogin                    welcome.msg
DisplayChdir                   .message true
ListOptions                    "-l"

DenyFilter            \*.*/

# Use this to jail all users in their homes
# DefaultRoot            ~

# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell        off

# Port 21 is the standard FTP port.
Port                21

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts                  49152 65534

# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress        1.2.3.4

# This is useful for masquerading address with dynamic IPs:
# refresh any configured MasqueradeAddress directives every 8 hours
<IfModule mod_dynmasq.c>
# DynMasqRefresh 28800
</IfModule>

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances            30

# Set the user and group that the server normally runs at.
User                proftpd
Group                nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                022  022
# Normally, we want files to be overwriteable.
AllowOverwrite            on

# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
# PersistentPasswd        off

# This is required to use both PAM-based authentication and local passwords
# AuthOrder            mod_auth_pam.c* mod_auth_unix.c

# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile            off

TransferLog /var/log/proftpd/xferlog
SystemLog   /var/log/proftpd/proftpd.log

<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>

<IfModule mod_ratio.c>
Ratios off
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>

<IfModule mod_ctrls.c>
ControlsEngine        off
ControlsMaxClients    2
ControlsLog           /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock
</IfModule>

<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>

#
# Alternative authentication frameworks
#
#Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf

#
# This is used for FTPS connections
#
#Include /etc/proftpd/tls.conf

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
#   User                ftp
#   Group                nogroup
#   # We want clients to be able to login with "anonymous" as well as "ftp"
#   UserAlias            anonymous ftp
#   # Cosmetic changes, all files belongs to ftp user
#   DirFakeUser    on ftp
#   DirFakeGroup on ftp
#
#   RequireValidShell        off
#
#   # Limit the maximum number of anonymous logins
#   MaxClients            10
#
#   # We want 'welcome.msg' displayed at login, and '.message' displayed
#   # in each newly chdired directory.
#   DisplayLogin            welcome.msg
#   DisplayChdir        .message
#
#   # Limit WRITE everywhere in the anonymous chroot
#   <Directory *>
#     <Limit WRITE>
#       DenyAll
#     </Limit>
#   </Directory>
#
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask to prevent new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask                022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
# </Anonymous>

Viele Grüße,
Rene
(This post was last modified: 12-26-2010 01:10 PM by renew.)
12-26-2010 01:01 PM
Find all posts by this user Quote this message in a reply
FISA4 Offline
Member
***

Posts: 668
Joined: Feb 2008
Reputation: 15
Post: #2
RE: FTP - Can not open directory!
deine ftp_choose_dir.php datei ist nicht ok.
kann es sein, dass du den trunk benutzt oder irgendein nightly build?
12-26-2010 06:56 PM
Find all posts by this user Quote this message in a reply
renew Offline
Newbie
*

Posts: 5
Joined: Dec 2010
Reputation: 0
Post: #3
RE: FTP - Can not open directory!
(12-26-2010 06:56 PM)FISA4 Wrote:  deine ftp_choose_dir.php datei ist nicht ok.
kann es sein, dass du den trunk benutzt oder irgendein nightly build?

Also ispCP kann ich von meinem Hosteraccount aus (also das CP um mein VServer zu konfigurieren) automatisch installieren (falls du das meinst). Das habe ich getan.

Hier die Datei ftp_choose_dir.php
Code:
<?php
/**
* ispCP ω (OMEGA) a Virtual Hosting Control System
*
* @copyright     2001-2006 by moleSoftware GmbH
* @copyright     2006-2008 by ispCP | http://isp-control.net
* @version     SVN: $Id$
* @link         http://isp-control.net
* @author         ispCP Team
*
* @license
*   This program is free software; you can redistribute it and/or modify it under
*   the terms of the MPL General Public License as published by the Free Software
*   Foundation; either version 1.1 of the License, or (at your option) any later
*   version.
*   You should have received a copy of the MPL Mozilla Public License along with
*   this program; if not, write to the Open Source Initiative (OSI)
*   http://opensource.org | osi@opensource.org
*/

require '../include/class.vfs.php';
require '../include/ispcp-lib.php';

check_login(__FILE__);

$tpl = new pTemplate();
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('dir_item', 'page');
$tpl->define_dynamic('action_link', 'page');
$tpl->define_dynamic('list_item', 'page');
$tpl->define_dynamic('page', Config::get('CLIENT_TEMPLATE_PATH') . '/ftp_choose_dir.tpl');

$theme_color = Config::get('USER_INITIAL_THEME');

function gen_directories(&$tpl) {
    $sql = Database::getInstance();
    // Initialize variables
    $path = isset($_GET['cur_dir']) ? $_GET['cur_dir'] : '';
    $domain = $_SESSION['user_logged'];
    // Create the virtual file system and open it so it can be used
    $vfs = &new vfs($domain, $sql);
    // Get the directory listing
    $list = $vfs->ls($path);
    if (!$list) {
        set_page_message(tr('Can not open directory !<br>Please contact your administrator !'));
        return;
    }
    // Show parent directory link
    $parent = explode('/', $path);
    array_pop($parent);
    $parent = implode('/', $parent);
    $tpl->assign('ACTION_LINK', '');
    $tpl->assign(array('ACTION' => '',
            'ICON' => "parent",
            'DIR_NAME' => tr('Parent Directory'),
            'LINK' => 'ftp_choose_dir.php?cur_dir=' . $parent,
            ));
    $tpl->parse('DIR_ITEM', '.dir_item');
    // Show directories only
    foreach ($list as $entry) {
        // Skip non-directory entries
        if ($entry['type'] != VFS_TYPE_DIR)
            continue;
        // Skip '.' and '..'
        if ($entry['file'] == '.' || $entry['file'] == '..')
            continue;
        // Check for .htaccess existance to display another icon
        $dr = $path . '/' . $entry['file'];
        $tfile = $dr . '/.htaccess';
        if ($vfs->exists($tfile)) {
            $image = "locked";
        } else {
            $image = "folder";
        }
        // Create the directory link
        $tpl->assign(array('ACTION' => tr('Protect it'),
                'PROTECT_IT' => "protected_areas_add.php?file=$dr",
                'ICON' => $image,
                'DIR_NAME' => $entry['file'],
                'CHOOSE_IT' => $dr,
                'LINK' => "ftp_choose_dir.php?cur_dir=$dr",
                ));
        $tpl->parse('ACTION_LINK', 'action_link');
        $tpl->parse('DIR_ITEM' , '.dir_item');
    }
}
// functions end
$tpl->assign(
    array('TR_CLIENT_WEBTOOLS_PAGE_TITLE' => tr('ispCP - Client/Webtools'),
        'THEME_COLOR_PATH' => "../themes/$theme_color",
        'THEME_CHARSET' => tr('encoding'),
        'ISP_LOGO' => get_logo($_SESSION['user_id'])
        )
    );

gen_directories($tpl);

$tpl->assign(
    array('TR_DIRECTORY_TREE' => tr('Directory tree'),
        'TR_DIRS' => tr('Directories'),
        'TR__ACTION' => tr('Action'),
        'CHOOSE' => tr('Choose')
        )
    );

gen_page_message($tpl);

$tpl->parse('PAGE', 'page');
$tpl->prnt();

if (Config::get('DUMP_GUI_DEBUG'))
    dump_gui_debug();

unset_messages();

?>
(This post was last modified: 12-26-2010 10:42 PM by renew.)
12-26-2010 10:18 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: FTP - Can not open directory!
Die PHP-Datei ist ok, aber die ProFTPd Config nicht!
Das ist keine ispCP Config und hast somit keine Verbindung zur MySQL Datenbank.
Code:
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
Steht ja gleich in der Zweiten Zeile Wink
Schau mal nach der Backupdatei, ist wahrscheinlich durch ein Update gekommen ?!

Greez BeNe
12-27-2010 06:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
renew Offline
Newbie
*

Posts: 5
Joined: Dec 2010
Reputation: 0
Post: #5
RE: FTP - Can not open directory!
Guten Tag und ein Frohes neues,
hatte leider kein internet weil t-online es mal wieder nicht auf die Reihe bekommen hat. Egal ich bin wieder da und mache mal weiter.

Du hattest aufjedenfall recht!
Es liegt an einem update welches ich vorgenommen hatte.
durch apt-get update hat es die alte Config überschrieben.

So nun geht die Fehlersuche los. Ich habe erstmal ein Backup der alten config auf den server geladen[/php]. Nach einem Neustart von proftpd (/etc/init.d/proftpd restart) habe ich folgende Fehlermeldung erhalten:

Code:
- Fatal: SQLMinUserUID: requires a numeric argument on line 169 of '/etc/proftpd/proftpd.conf'

Daraufhin habe ich gecheckt ob "LoadModule mod_sql.c" und "LoadModule mod_sql_mysql.c" in der /etc/proftpd/modules.conf augeklammert sind.

Auch das ausklammern von SQLBackend hat nichts gebraucht.
btw. proftpd-mysql ist installiert.

Hat jemand eine Idee?

Viele Grüße,
rene

//edit:
Habe nach goolgerei gelesen das ich folgendes manuell bestimmen kann.
SQLMinUserUID 2000
SQLMinUserGID 2000

Nun habe ich einfach in der Config die daten direkt eingetragen:

Code:
SQLConnectInfo             ispcp@localhost vftp geheimesUservftp

Kurzer restart und zack es funktioniert.

Ich weiß aber nicht ob das so eine gute Idee ist. Durch was werden denn normalerweiße die Variablen ersetzt? Das scheint ja der eigentliche Fehler zu sein. Alles per hand eintragen halte ich für schwachsinn.
(This post was last modified: 01-05-2011 10:57 PM by renew.)
01-05-2011 09:51 PM
Find all posts by this user Quote this message in a reply
Trevit Offline


Posts: 2
Joined: Jan 2011
Reputation: 0
Post: #6
RE: FTP - Can not open directory!
Ich habe das selbe Problem, aber nichts von dem hat geklappt.
01-07-2011 03:09 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)