Perfect Server (Lenny & ISPC2), how to FTP into server from Windows?

Discussion in 'Installation/Configuration' started by S3NTYN3L, Apr 4, 2009.

  1. S3NTYN3L

    S3NTYN3L New Member

    I understand how to connect via FTP client to my ISPC website folder, but how to I connect to the SERVER itself?

    Every time I try to upload to my website folder via ISPC or a third-party FTP client, I get CHMOD errors and such. Trying to change the CHMOD settings via ISPC does NOTHING.


    In short, I'm needing the ability to transfer files directly to my server, bypassing ISPC altogether...


    I've tried reading the ProFTPd documentation, but I don't want to screw something up. Never mind the fact that I didn't understand any of the subject matter...
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You must use an FTP client such as FileZilla.
     
  3. S3NTYN3L

    S3NTYN3L New Member

    I know this...

    That is what I'm doing...


    As I said, I get nothing but 550 errors when using the login I created within ISPC.


    Every login I try to access the server itself doesn't work.
    What is the point of having the FTP server software if I can't connect to it?


    Hell, every time I log into the ISPC admin and click the Web-FTP button I'm UNABLE to move folders or change CHMOD settings...
     
  4. falko

    falko Super Moderator ISPConfig Developer

    This is a problem with your server only.

    Any errors in your log files?

    What's the output of
    Code:
    netstat -tap
    ?
     
  5. S3NTYN3L

    S3NTYN3L New Member

    Code:
    server1:~# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:mysql                 *:*                     LISTEN      16405/mysqld
    tcp        0      0 *:sunrpc                *:*                     LISTEN      1783/portmap
    tcp        0      0 *:81                    *:*                     LISTEN      3771/ispconfig_http
    tcp        0      0 server1.mydomain:domain *:*                     LISTEN      3926/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN      3926/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      2020/sshd
    tcp        0      0 *:41878                 *:*                     LISTEN      1794/rpc.statd
    tcp        0      0 *:smtp                  *:*                     LISTEN      10495/master
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN      3926/named
    tcp        0    248 server1.mydomain.ne:ssh 192.168.1.10:59146      ESTABLISHED 18487/0
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      8966/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      8983/couriertcpd
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      8793/couriertcpd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      8874/couriertcpd
    tcp6       0      0 [::]:www                [::]:*                  LISTEN      1683/apache2
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      10418/proftpd: (acc
    tcp6       0      0 [::]:domain             [::]:*                  LISTEN      3926/named
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      2020/sshd
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      10495/master
    tcp6       0      0 localhost:953           [::]:*                  LISTEN      3926/named
    tcp6       0      0 [::]:https              [::]:*                  LISTEN      1683/apache2
    server1:~#
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Proftpd is running. Did you find any FTP-related errors in your logs?

    What's the output of
    Code:
    iptables -L
    ?
     
  7. S3NTYN3L

    S3NTYN3L New Member

    Yes, I know it's running.
    As I said, I can connect via my ISPC login.
    I CANNOT change chmod settings or manage ANY files once logged in.
    Even when I go directly into the web folder using the Web-FTP link in the ISPC admin I CANNOT change chmod settings or manage files.

    The output of iptables -L is as follows:

    Code:
    
    server1:~# iptables -L
    Chain INPUT (policy DROP)
    target     prot opt source               destination
    DROP       tcp  --  anywhere             loopback/8
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere
    DROP       all  --  BASE-ADDRESS.MCAST.NET/4  anywhere
    PUB_IN     all  --  anywhere             anywhere
    PUB_IN     all  --  anywhere             anywhere
    PUB_IN     all  --  anywhere             anywhere
    PUB_IN     all  --  anywhere             anywhere
    DROP       all  --  anywhere             anywhere
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
    DROP       all  --  anywhere             anywhere
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    PUB_OUT    all  --  anywhere             anywhere
    PUB_OUT    all  --  anywhere             anywhere
    PUB_OUT    all  --  anywhere             anywhere
    PUB_OUT    all  --  anywhere             anywhere
    
    Chain INT_IN (0 references)
    target     prot opt source               destination
    ACCEPT     icmp --  anywhere             anywhere
    DROP       all  --  anywhere             anywhere
    
    Chain INT_OUT (0 references)
    target     prot opt source               destination
    ACCEPT     icmp --  anywhere             anywhere
    ACCEPT     all  --  anywhere             anywhere
    
    Chain PAROLE (10 references)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere
    
    Chain PUB_IN (4 references)
    target     prot opt source               destination
    ACCEPT     icmp --  anywhere             anywhere            icmp destination-unreachable
    ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply
    ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded
    ACCEPT     icmp --  anywhere             anywhere            icmp echo-request
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:ftp
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:ssh
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:smtp
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:domain
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:www
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:81
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:pop3
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:imap2
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:https
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:webmin
    ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
    DROP       icmp --  anywhere             anywhere
    DROP       all  --  anywhere             anywhere
    
    Chain PUB_OUT (4 references)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere
    
    


    Once we get this thing working properly, would you mind walking me through how I go about setting up a user and folder for use OUTSIDE of ISPC?
    I'm needing that to transfer files that I don't want associated with my website (In it's folders).
     
  8. falko

    falko Super Moderator ISPConfig Developer

    You cannot chmod files/directories with the Web-FTP tool. You must use a "real" FTP client for this such as FileZilla.
     
  9. S3NTYN3L

    S3NTYN3L New Member

    Good enough.

    It seems strange, then, that the Web-FTP tool would open a window when double-clicking a file that is for changing CHMOD settings... <undecided.gif>

    In any case, the issue still stands.

    I CANNOT manage files or edit CHMOD settings via ANY third-party FTP client I've tried.


    Any idea what the issue is?

    I still need to know how to setup a user and folder for FTP access to the server APART from ISPC.
     
  10. falko

    falko Super Moderator ISPConfig Developer

    What's in your proftpd.conf?
     
  11. S3NTYN3L

    S3NTYN3L New Member

    From which folder? There are several places...

    Code:
    server1:~# whereis proftpd.conf
    proftpd: /usr/sbin/proftpd /etc/proftpd.conf /etc/proftpd
    /usr/lib/proftpd /usr/share/proftpd /usr/share/man/man8/proftpd.8.gz
    server1:~#
    

    If you're referring to the one at /etc/proftpd.conf, then:

    Code:
    server1:~# vi /etc/proftpd.conf
    
    #   <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>
    
    
    Include /etc/proftpd_ispconfig.conf

    The one at /etc/proftpd_ispconfig.conf looks like this:

    Code:
    ###################################
    #
    # ISPConfig proftpd Configuration File
    #         Version 1.0
    #
    ###################################
    DefaultAddress 127.0.0.1
    <VirtualHost 192.168.1.30>
            DefaultRoot             ~
            AllowOverwrite          on
            Umask                   002
    </VirtualHost>
    
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Please post your full /etc/proftpd.conf (you've posted only the last part).
     
  13. S3NTYN3L

    S3NTYN3L New Member

    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.
    DefaultRoot ~
    IdentLookups                    off
    ServerIdent on "FTP Server ready."
    
    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>
    
    
    Include /etc/proftpd_ispconfig.conf
    
    
    
     
  14. falko

    falko Super Moderator ISPConfig Developer

    Looks good. What's in /etc/proftpd/modules.conf?
     
  15. S3NTYN3L

    S3NTYN3L New Member

    Code:
    
    #
    # This file is used to manage DSO modules and features.
    #
    
    # This is the directory where DSO modules reside
    
    ModulePath /usr/lib/proftpd
    
    # Allow only user root to load and unload modules, but allow everyone
    # to see which modules have been loaded
    
    ModuleControlsACLs insmod,rmmod allow user root
    ModuleControlsACLs lsmod allow user *
    
    LoadModule mod_ctrls_admin.c
    LoadModule mod_tls.c
    
    # Install proftpd-mod-mysql or proftpd-mod-pgsql to use this
    #LoadModule mod_sql.c
    
    # Install proftpd-mod-ldap to use this
    #LoadModule mod_ldap.c
    
    #
    # 'SQLBackend mysql' or 'SQLBackend postgres' directives are required
    # to have SQL authorization working. You can also comment out the
    # unused module here, in alternative.
    #
    
    # Install proftpd-mod-mysql to use this
    #LoadModule mod_sql_mysql.c
    
    # Install proftpd-mod-pgsql to use this
    #LoadModule mod_sql_postgres.c
    
    LoadModule mod_radius.c
    LoadModule mod_quotatab.c
    LoadModule mod_quotatab_file.c
    
    # Install proftpd-mod-ldap to use this
    #LoadModule mod_quotatab_ldap.c
    
    # Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
    #LoadModule mod_quotatab_sql.c
    LoadModule mod_quotatab_radius.c
    LoadModule mod_wrap.c
    LoadModule mod_rewrite.c
    LoadModule mod_load.c
    LoadModule mod_ban.c
    LoadModule mod_wrap2.c
    LoadModule mod_wrap2_file.c
    # Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
    #LoadModule mod_wrap2_sql.c
    LoadModule mod_dynmasq.c
    
    
    # keep this module the last one
    LoadModule mod_ifsession.c
    
    
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Looks good as well. There's one last idea I have - it is possible that the chmod commands are filtered out by a firewall. There are some firewalls that can do stuff like that.
     
  17. S3NTYN3L

    S3NTYN3L New Member

    EDIT:

    OK, I uninstalled Comodo and still had the same issue.

    I found in the "Joomla for ISPC in ten steps" tutorial the following:


    cd /var/www/web1/

    chown -R -v -f webadmin:web1 web/*


    This was given as an alternative if using PHP5 w/ CGI or something to that effect...

    I did this and can now change permissions and manage my files.




    Now, How do I go about setting up a user and folder for use OUTSIDE of ISPC?
     
    Last edited: Apr 12, 2009
  18. falko

    falko Super Moderator ISPConfig Developer

    You can use the useradd command to create new system users - see
    Code:
    man useradd
     
  19. S3NTYN3L

    S3NTYN3L New Member

    OK, I just noticed something:


    Using the first method is the ONLY way I can get file editable for Joomla.

    Using the alternative is the ONLY way I'm able to do ANYTHING via FTP.



    Is there a way I can chown two users to the same files at the same time?



    As for that "man useradd" command, I still don't get it.
    Care to hold my hand?
     
  20. falko

    falko Super Moderator ISPConfig Developer

    You can add both users to the same group and then make the group own the file.

    Code:
    adduser user1 mygroup
    adduser user2 mygroup  
    chgrp mygroup /path/to/file


    Code:
    useradd -d /home/someuser -m -s /bin/bash someuser
    passwd someuser
     

Share This Page