View Poll Results: Do you think that gproftpd is useful ?

Voters
872. You may not vote on this poll
  • Yes, it's easy to use and really powerful

    473 54.24%
  • Yes, but i won't use it

    136 15.60%
  • No, the GUI has to be improved

    263 30.16%
Page 121 of 123 FirstFirst ... 2171111119120121122123 LastLast
Results 1,201 to 1,210 of 1225

Thread: HOWTO : Create a FTP server with user access (proftpd)

  1. #1201
    Join Date
    Sep 2011
    Beans
    7

    Re: HOWTO : Create a FTP server with user access (proftpd)

    I used this guide I think it is nice, but the only problem is the user is not locked into the directory!

    This is not too bad of a problem because I do not broadcast that IP, but I still do not want an open system. I followed the guide to the "T" except for the directory is /home/XXX/Videos

    Can you think of any reasons why it is letting the user go out of Videos?

  2. #1202
    Join Date
    Jun 2005
    Location
    France
    Beans
    7,100
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO : Create a FTP server with user access (proftpd)

    Config file and user config detail please (i mean the user you created to use the FTP server) ?

    Without this we can't help you.

  3. #1203

    Re: HOWTO : Create a FTP server with user access (proftpd)

    Hello frodon,

    Thankyou for your help in this thread.

    I have Proftp running fine with Ubuntu 11.04.
    Using dyndns.org also working fine.

    What I would like to create is a user who can delete files.

    I guess I need to use the <Limit > .. </Limit> rules. Could you give an example based on the code below please? ( I could not find what I needed to know in the thread search)

    many thanks in advance.


    #userftp1 to be allowed to delete files

    #VALID LOGINS
    <Limit LOGIN>
    AllowUser userftp1
    AllowUser userftp2
    DenyALL
    </Limit>

    <Directory /home/FTP-shared>
    Umask 022 022
    AllowOverwrite off
    <Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD>
    DenyAll
    </Limit>
    </Directory>

    <Directory /home/FTP-shared/download/*>
    Umask 022 022
    AllowOverwrite off
    <Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>
    DenyAll
    </Limit>
    </Directory>

    <Directory /home/FTP-shared/upload/>
    Umask 022 022
    AllowOverwrite on
    <Limit READ RMD DELE>
    DenyAll
    </Limit>

    <Limit STOR CWD MKD>
    AllowAll
    </Limit>
    </Directory>
    Last edited by Steve(spt); September 28th, 2011 at 07:51 PM. Reason: spelling

  4. #1204
    Join Date
    Jun 2005
    Location
    France
    Beans
    7,100
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO : Create a FTP server with user access (proftpd)

    I'm scared you will have to go with some reading of the Proftp documentation. The tutorial shows a way to limit access to directories to some users but all the allowed users in a directory have the same rights.

    I'm pretty sure what you want to do is possible but the hard thing is to find the right way to do it and i'm not sure the way described in my tutorial is the way to go.

    Maybe you should post your question in the proftp forum too, there are some good experts in this place.

  5. #1205
    Join Date
    Aug 2009
    Beans
    2

    Re: HOWTO : Create a FTP server with user access (proftpd)

    Quote Originally Posted by frodon View Post
    Replace :
    Code:
    ServerType                      inetd
    by :
    Code:
    ServerType             standalone
    and it should work.

    By the way the "RootLogin on" option is not really secure, if you don't know why you use it i advice you to put it off.
    thanks this worked for me!
    ~Vikram

  6. #1206
    Join Date
    Nov 2011
    Beans
    13

    Re: HOWTO : Create a FTP server with user access (proftpd)

    Hi all,

    I got a problem when configure my ftp setting.
    I has bind the user to their private folder, for example testuser bind to /usr/local/folder/testuser

    I tried the setting on active mode, ok no problem. testuser can only see their folder only. But when I try in passive mode, the user can navigate to other folder. How to force the user to can only see their folder, no matter in passive or active mode.

    Below is my config setting.

    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			        40	
    
    # 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
    
    MaxClients 9
    MaxClientsPerHost 9
    MaxClientsPerUser 9
    MaxHostsPerUser 9
    
    AllowForeignAddress off
    
    # 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?pag...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>
    
    #VALID LOGINS
    <Limit LOGIN>
    AllowUser tfluxadmin
    AllowUser testuser
    DenyALL
    </Limit>
    
    
    
    <Directory /usr/local/folder/>
    Umask 022 022
    AllowOverwrite off
    	
            <Limit ALL>
    		Order Allow,Deny
    		AllowUser tfluxadmin
    		Deny ALL
            </Limit>
    
    </Directory>
    
    <Directory /usr/local/folder/testuser>
    Umask 022 022
    AllowOverwrite off
    	
           <Limit ALL>
    		Order Allow,Deny
    		AllowUser tfluxadmin
            AllowUser testuser
    		Deny ALL
          </Limit>
    
          <Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>
    	DenyAll
          </Limit>
    
    </Directory>
    
    <Directory /usr/>
    Umask 077 077
    AllowOverwrite off
    	
            <Limit ALL>
    		Order Allow,Deny
    		Deny ALL
            </Limit>
    
    </Directory>
    Last edited by sil3nthunt3r; November 17th, 2011 at 03:10 AM.

  7. #1207
    Join Date
    Jun 2005
    Location
    France
    Beans
    7,100
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO : Create a FTP server with user access (proftpd)

    Add somewhere before the <Limit LOGIN> section the following command :
    Code:
    DefaultRoot	/usr/local/folder/testuser
    The DefaultRoot command is the command allowing to define where to lock the user ("~" indicates the user's home directory but it is even better to give a hard path if it suit your needs).

  8. #1208
    Join Date
    Nov 2011
    Beans
    13

    Re: HOWTO : Create a FTP server with user access (proftpd)

    Quote Originally Posted by frodon View Post
    Add somewhere before the <Limit LOGIN> section the following command :
    Code:
    DefaultRoot	/usr/local/folder/testuser
    The DefaultRoot command is the command allowing to define where to lock the user ("~" indicates the user's home directory but it is even better to give a hard path if it suit your needs).
    Thanks. It working now

  9. #1209
    Join Date
    Nov 2011
    Beans
    2

    Re: HOWTO : Create a FTP server with user access (proftpd)

    How would I go about creating multiple FTP accounts to go along with apache?

    I'd like something like this:

    FTP Login Directory: /home/bob/
    HTTP Root Directory:/home/bob/www

    FTP Login Directory: /home/joe/
    HTTP Root Directory:/home/joe/www

    FTP Login Directory: /home/jack/
    HTTP Root Directory:/home/jack/www

    and I'd like them to be able to access something like:
    http://<ip>/bob/
    http://<ip>/joe/
    http://<ip>/jack/

    and maybe subdomains for them

  10. #1210
    Join Date
    Nov 2011
    Beans
    13

    Re: HOWTO : Create a FTP server with user access (proftpd)

    I have another problem.
    When using Flashget, my FTP connection will give error 530: Maximum user already login (9) after some time. I have add the maximum connection to 9, but still give me 530 error. Increase the maximum connection also give the same error after some time.

    But when I try using IDM, no such problem.
    Anything wrong in my config?

    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			/usr/local/
    
    # 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			        40	
    
    # 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
    
    MaxClients 9
    MaxClientsPerHost 9
    MaxClientsPerUser 9
    MaxHostsPerUser 9
    
    AllowForeignAddress off
    
    # 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?pag...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>
    
    #VALID LOGINS
    <Limit LOGIN>
    AllowUser tfluxadmin
    AllowUser testuser
    DenyALL
    </Limit>
    
    
    
    <Directory /usr/local/folder/>
    Umask 022 022
    AllowOverwrite off
    	
            <Limit ALL>
    		Order Allow,Deny
    		AllowUser tfluxadmin
    		Deny ALL
            </Limit>
    
    </Directory>
    
    <Directory /usr/local/folder/testuser>
    Umask 022 022
    AllowOverwrite off
    	
           <Limit ALL>
    		Order Allow,Deny
    		AllowUser tfluxadmin
            AllowUser testuser
    		Deny ALL
          </Limit>
    
          <Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>
    	DenyAll
          </Limit>
    
    </Directory>
    
    <Directory /usr/>
    Umask 077 077
    AllowOverwrite off
    	
            <Limit ALL>
    		Order Allow,Deny
    		Deny ALL
            </Limit>
    
    </Directory>

Page 121 of 123 FirstFirst ... 2171111119120121122123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •