| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Thu Mar 31, 2011 5:07 am    Post subject: User can not ftp. |   |  
				| 
 |  
				| Hi! 
 I use webmin create user
 
 - username: test1
 - password: type normal passwd: 1234
 - home directory: /home/test1
 
 when I use filezilla ftp to server but can not do it.
 
 ####################
 Response:	331 Password required for test1
 Command:	PASS ****
 Response:	530 Login incorrect.
 Error:	Critical error
 Error:	Could not connect to server
 ####################
 
 
 My Proftpd.conf
 
 ########################
 ServerType standalone
 DefaultServer on
 Umask 022
 ServerName "SMS FTP"
 ServerIdent on "SMS FTP Server"
 ServerAdmin root@sms
 IdentLookups off
 UseReverseDNS off
 Port 21
 PassivePorts 49150 65534
 #MasqueradeAddress None
 TimesGMT off
 MaxInstances 30
 MaxLoginAttempts 3
 TimeoutLogin 300
 TimeoutNoTransfer 120
 TimeoutIdle 120
 DisplayLogin welcome.msg
 DisplayChdir .message
 User nobody
 Group nobody
 DirFakeUser off nobody
 DirFakeGroup off nobody
 DefaultTransferMode binary
 AllowForeignAddress off
 AllowRetrieveRestart on
 AllowStoreRestart on
 DeleteAbortedStores off
 TransferRate RETR 30
 TransferRate STOR 40
 TransferRate STOU 40
 TransferRate APPE 40
 SystemLog /var/log/secure
 RequireValidShell off
 #gp_random_username_length 6
 #gp_random_password_length 6
 #gp_randomize_case lower
 #gp_useradd_homedir_path /var/ftp
 #gp_useradd_upload_path /upload
 #gp_html_path /var/www/html/ftp.htm
 #gp_welcome_name welcome.msg
 <IfModule mod_tls.c>
 TLSEngine off
 TLSRequired auth+data
 TLSVerifyClient off
 TLSProtocol SSLv23 TLSv1
 TLSLog /usr/var/log/proftpd_tls.log
 TLSRSACertificateFile /etc/gadmin-proftpd/gadmin-proftpd.pem
 TLSRSACertificateKeyFile /etc/gadmin-proftpd/gadmin-proftpd.pem
 TLSCACertificateFile /etc/gadmin-proftpd/gadmin-proftpd.pem
 TLSRenegotiate required off
 </IfModule>
 <IfModule mod_ratio.c>
 Ratios off
 SaveRatios off
 RatioFile "/restricted/proftpd_ratios"
 RatioTempFile "/restricted/proftpd_ratios_temp"
 CwdRatioMsg "Please upload first!"
 FileRatioErrMsg "FileRatio limit exceeded, upload something first..."
 ByteRatioErrMsg "ByteRatio limit exceeded, upload something first..."
 LeechRatioMsg "Your ratio is unlimited."
 </IfModule>
 <Limit LOGIN>
 AllowUser ftpuser
 AllowUser webftp
 DenyALL
 </Limit>
 
 <Anonymous /var/ftp>
 User ftpuser
 Group nobody
 AnonRequirePassword on
 MaxClients 5 "The server is full, hosting %m users"
 DisplayLogin welcome.msg
 DisplayChdir .msg
 UserRatio ftpuser 0 0 0 0
 <Limit LOGIN>
 Allow from all
 Deny from all
 </Limit>
 AllowOverwrite on
 <Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE  SITE_CHMOD  SITE_CHGRP  MTDM  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
 </Limit>
 <Limit NOTHING >
 DenyAll
 </Limit>
 </Anonymous>
 
 <Anonymous /srv/httpd/htdocs>
 User webftp
 Group nobody
 AnonRequirePassword on
 MaxClients 5 "The server is full, hosting %m users"
 DisplayLogin welcome.msg
 DisplayChdir .msg
 UserRatio webftp 0 0 0 0
 <Limit LOGIN>
 Allow from all
 Deny from all
 </Limit>
 AllowOverwrite on
 <Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE SITE_CHMOD SITE_CHRGP MTDM PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
 </Limit>
 <Limit NOTHING >
 DenyAll
 </Limit>
 </Anonymous>
 GroupPassword nobody 1107IN7zos9bs
 
 ##################
 
 
 How I config to enable user can use ftp?
 
 Thank you
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Thu Mar 31, 2011 5:52 am    Post subject: |   |  
				| 
 |  
				| Use the script bellow to add ftp users. 
 
  	  | Code: |  	  | #!/bin/bash 
 echo "Choose FTP User"
 read USERNAME
 
 echo "Choose your FTP Share Path For $USERNAME"
 read FTPPATH
 
 passwd $USERNAME
 
 useradd -g nobody,users -s /bin/false  -d $FTPPATH $USERNAME
 
 mkdir -p $FTPPATH
 chown -R $USERNAME $FTPPATH
 chmod 777 $FTPPATH
 echo "<Anonymous $FTPPATH>
 User $USERNAME
 Group nobody
 AnonRequirePassword on
 MaxClients 5 \"The server is full, hosting %m users\"
 DisplayLogin welcome.msg
 DisplayChdir .msg
 UserRatio $USERNAME 0 0 0 0
 <Limit LOGIN>
 Allow from all
 Deny from all
 </Limit>
 AllowOverwrite on
 <Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE_CHMOD  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
 </Limit>
 <Limit SITE  SITE_CHMOD  SITE_CHGRP  MTDM >
 DenyAll
 </Limit>
 </Anonymous>" >> /etc/proftpd.conf
 echo "Applying Changes"
 /etc/rc.d/rc.proftpd restart
 | 
 
 If your test1 user exists just add in proftpd.conf
 
  	  | Code: |  	  | <Anonymous /home/test1> User test1
 Group nobody
 AnonRequirePassword on
 MaxClients 5 \"The server is full, hosting %m users\"
 DisplayLogin welcome.msg
 DisplayChdir .msg
 UserRatio test1 0 0 0 0
 <Limit LOGIN>
 Allow from all
 Deny from all
 </Limit>
 AllowOverwrite on
 <Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE_CHMOD  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
 </Limit>
 <Limit SITE  SITE_CHMOD  SITE_CHGRP  MTDM >
 DenyAll
 </Limit>
 </Anonymous>
 | 
 
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Thu Mar 31, 2011 6:09 am    Post subject: |   |  
				| 
 |  
				| Thank you very much. |  | 
	
		| Back to top |  | 
	
		| womariya Junior Member
 
 
 Joined: 28 Jul 2011
 Posts: 1
 
 
 | 
			
				|  Posted: Sun Jul 31, 2011 9:44 am    Post subject: |   |  
				| 
 |  
				| An Internet server is running both FTP and HTTP services. How does the server know which of these applications should handle an incoming segment? _________________
 affiliateelite ~ affiliateelite.com
 |  | 
	
		| Back to top |  | 
	
		| beale Junior Member
 
 
 Joined: 30 Jul 2011
 Posts: 4
 Location: Columbus, Ohio, USA
 
 |  | 
	
		| Back to top |  | 
	
		| beale Junior Member
 
 
 Joined: 30 Jul 2011
 Posts: 4
 Location: Columbus, Ohio, USA
 
 | 
			
				|  Posted: Sun Jul 31, 2011 3:13 pm    Post subject: |   |  
				| 
 |  
				| Sorry, I worded my response rather badly. I meant to say, the user with his or her browser, puts http://  or ftp:// or https:// or smb:// at the beginning of the address. We usually don't have to fill it in because since most requests are for http servers, browsers automatically assume it's http and front-fill http://, unless we put in something else. There is one more ingredient. There are port numbers that each server (program) listens on. The standards are assumed (like 80 for http, 21 for ftp). You can change the listening port on your server in the setup. In the browser, if it is other than a standard, that goes at the end of the address after a : 
 https://myserver.com:10000
 
 Hope this helped clear it up.
 
 -Beale
 |  | 
	
		| Back to top |  | 
	
		|  |