Limit FTP access to a certain folder for all customers

Discussion in 'Installation/Configuration' started by Xtracted, Sep 29, 2007.

  1. Xtracted

    Xtracted New Member

    I want to limit the FTP access for all customers to just the folder web/uploaded, how do you suggest I do this?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try to set the default root in the proftpd.conf file to:

    DefaultRoot ~/web/uploaded
     
  3. Xtracted

    Xtracted New Member

    I did that and restarted the FTP service but it didn't affect anything when I log in..
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the content of the proftpd.conf file, comments stripped.
     
  5. Xtracted

    Xtracted New Member

    Include /etc/proftpd/modules.conf

    UseIPv6 off

    ServerName "Debian"
    ServerType standalone
    DeferWelcome off

    MultilineRFC2228 on
    DefaultServer on
    ShowSymlinks on

    TimeoutNoTransfer 600
    TimeoutStalled 600
    TimeoutIdle 1200

    DisplayLogin welcome.msg
    DisplayFirstChdir .message
    ListOptions "-l"

    DenyFilter \*.*/

    Port 21

    MaxInstances 30

    User proftpd
    Group nogroup

    Umask 022 022
    AllowOverwrite on

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

    <IfModule mod_tls.c>
    TLSEngine off
    </IfModule>

    <IfModule mod_quota.c>
    QuotaEngine on
    </IfModule>

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

    <IfModule mod_delay.c>
    DelayEngine on
    </IfModule>

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

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

    DefaultRoot ~
    IdentLookups off
    ServerIdent on "FTP Server ready."

    Include /etc/proftpd_ispconfig.conf
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please replace the line:

    DefaultRoot ~

    with:

    DefaultRoot ~/web/uploaded

    as I suggested and restart proftpd.
     
  7. Xtracted

    Xtracted New Member

    I did that but it didn't help so I changed it back.
     
  8. the_spy

    the_spy New Member

    as I remember, the default root is also in Include /etc/proftpd_ispconfig.conf for each IP, so you need to edit this file also.
     
  9. Xtracted

    Xtracted New Member

    That file resets itself when I restart the FTP service..
     
    Last edited: Sep 30, 2007
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You will have to change the path in the master template instead:

    /root/ispconfig/isp/conf/proftpd_ispconfig.conf.master
     

Share This Page