Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » General Discussion

Post new topic   Reply to topic
User can not ftp.
View previous topic :: View next topic  
Author Message
Slackwan
Junior Member


Joined: 04 Jul 2010
Posts: 14

PostPosted: Thu Mar 31, 2011 5:07 am    Post subject: User can not ftp. Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Thu Mar 31, 2011 5:52 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Slackwan
Junior Member


Joined: 04 Jul 2010
Posts: 14

PostPosted: Thu Mar 31, 2011 6:09 am    Post subject: Reply with quote

Thank you very much.
Back to top
View user's profile Send private message
womariya
Junior Member


Joined: 28 Jul 2011
Posts: 1

PostPosted: Sun Jul 31, 2011 9:44 am    Post subject: Reply with quote

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
View user's profile Send private message
beale
Junior Member


Joined: 30 Jul 2011
Posts: 4
Location: Columbus, Ohio, USA

PostPosted: Sun Jul 31, 2011 2:44 pm    Post subject: Reply with quote

I think I know this one. In the address, if you put in nothing, like http, at the beginning, your browser assumes http. If you want ftp, you put in ftp. If you want a secure http connection, you use https (like for Webmin).

Ex.

http://myserver.com
ftp://myserver.com
https://myserver.com
ftp://192.168.0.197
https://192.168.0.197:10000
Back to top
View user's profile Send private message Visit poster's website
beale
Junior Member


Joined: 30 Jul 2011
Posts: 4
Location: Columbus, Ohio, USA

PostPosted: Sun Jul 31, 2011 3:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » General Discussion All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional