PDA

View Full Version : ftp server


scorpion
2004-02-15, 06:48 PM CST
:?:
help.
i got everything working here i want and all updated and the like.
the only thing that i'm stuck on is getting my ftp working
the client works just fine.
what i need to get running is the ftp server...
i have buisnesses needing to ftp me some stuff and i need to have files for them
any help here would be greatly apreciated.
:?:

vorte[x]
2004-02-16, 10:00 AM CST
Hi scorpion,

Can you check to see if you have vsftpd or proftpd installed by issuing "rpm -q vsftpd" or "rpm -q proftpd"?

In my opinion, proftpd is easier to set-up and use, so I suggest, if it's not installed, you install it via "yum install proftpd".

After installation, you'll need to edit some simple stuff in /etc/proftpd.conf.

Hope that at least gets you on your feet.

- V

scorpion
2004-02-16, 12:15 PM CST
well i used apt-get
apt-get install proftpd
after i
apt-get -f
got rid of the vsftpd
i also removed it from the add remove
the vsftp is still in the files listing but i guess it's not in use i dunno.
but i got the proftpd
now i hate to sound stupid but i'm new to the server stuff when it comes to linux
if i had windows i be up and running already since i know windblowz backwards and forwards,(ick what a scary thought)
but enough of that....
anyhow i got as i said b4 my website up and my own forum via apache.
took me a few days but i got it 8)
but i need to /etc/profptd.conf eddit.
since i said i'm new to it, if you can give me insight, ideas or even a example on how to go about edditing that config file i would apreciate it!

thanks.~~~
Scott-Gto286
http://gto286.sytes.net
http://gto286-forum.sytes.net
(proudly served up via apache v2.x running off Fedora core 1 (yarrow) linux)

vorte[x]
2004-02-16, 12:55 PM CST
Hi scorpion,

Here's some tips to get you up and running fast.

(Edit /etc/proftpd.conf as root)
- Make sure ServerType is set to standalone.
- If you want external users hitting your FTP server which is inside a local area network, add a MasqueradeAddress X.X.X.X line (replacing X.X.X.X with your WAN IP) You can quickly obtain your WAN IP by going to http://www.whatismyip.net
- Make sure Port is set to what you want it to be.

After saving that, you should be able to issue:
su - (become root, don't forget hyphen!)
service proftpd start

Hope that helps!

(if you have problems hitting the ftp server from another location, flush your iptables rules using iptables --flush for now (security warning!))

- V

scorpion
2004-02-17, 01:30 PM CST
well i did all that and so far it's a no go :(
but i'm still working on it.
i do apreciate the help you are giving me :-)

vorte[x]
2004-02-17, 08:42 PM CST
Hi scorpion,

Could you be a little more specific and explain what "no go" means? Does the service not start? Can't connection? Try running proftpd as root in a console and note it's output - Anything unusual?

- V

scorpion
2004-02-18, 11:10 AM CST
hi ya'
well i think i got it.
i'm not sure.

it is running
here try it
ftp://gto286.no-ip.com
you will find that theres no files showing
i know it working in /var/ftp for a directory
but i want to do is were in the proftpd.conf file i state the directory *ie* /var/ftp/files
plus i want it password protected
i could be wrong for the working directory being /var/ftp but i don't think so.
but hey ftp is working finally 8)

Scott-Gto286.......

vorte[x]
2004-02-18, 04:10 PM CST
Hi scorpion,

By default, proftpd is set up to be accessed by a real local user, and chroots them to their home directory. Ex: User1 logs in and gets dumped into /home/user1 and chrooted there.

- V

scorpion
2004-02-18, 07:42 PM CST
config file. here. updated version.....

# This is the ProFTPD configuration file
# $Id: proftpd.conf,v 1.6 2003/09/24 10:51:11 dude Exp $

ServerName "gto286.sytes.net"
ServerIdent on "FTP Server ready."
ServerAdmin root@localhost
ServerType standalone
#ServerType inetd
DefaultServer on
AccessGrantMsg "User %u logged in."
#DisplayConnect /etc/ftpissue
#DisplayLogin /etc/ftpmotd
#DisplayGoAway /etc/ftpgoaway
DeferWelcome off
MasqueradeAddress ##.##.##.###
# Use this to excude users from the chroot
DefaultRoot ~ftp

# Use pam to authenticate by default
AuthPAMAuthoritative on

# Do not perform ident nor DNS lookups (hangs when the port is filtered)
IdentLookups off
UseReverseDNS off

# Port 21 is the standard FTP port.
Port 21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# Default to show dot files in directory listings
ListOptions "-a"

# See Configuration.html for these (here are the default values)
#MultilineRFC2228 off
#RootLogin off
#LoginPasswordPrompt on
#MaxLoginAttempts 3
#MaxClientsPerHost none
#AllowForeignAddress off # For FXP

# Allow to resume not only the downloads but the uploads too
AllowRetrieveRestart on
AllowStoreRestart on

# 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 20

# Set the user and group that the server normally runs at.
User gto286
Group gto286

# This is where we want to put the pid file
ScoreboardFile /var/run/proftpd.score

# Normally, we want users to do a few things.
<Global>
AllowOverwrite yes
<Limit ALL SITE_CHMOD>
AllowAll
</Limit>
</Global>

# Define the log formats
LogFormat default "%h %l %u %t "%r" %s %b"
LogFormat auth "%v [%P] %h %t "%r" %s"

# TLS
# Explained at http://www.castaglia.org/proftpd/modules/mod_tls.html
#TLSEngine on
#TLSRequired on
#TLSRSACertificateFile /usr/share/ssl/certs/proftpd.pem
#TLSRSACertificateKeyFile /usr/share/ssl/certs/proftpd.pem
#TLSCipherSuite ALL:!ADH:!DES
#TLSOptions NoCertRequest
#TLSVerifyClient off
##TLSRenegotiate ctrl 3600 data 512000 required off timeout 300
#TLSLog /var/log/proftpd/tls.log

# A basic anonymous configuration, with an upload directory.
#<Anonymous ~ftp>
User ftp
Group ftp
AccessGrantMsg "Anonymous login ok, restrictions apply."
#
# # We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
#
# # Limit the maximum number of anonymous logins
MaxClients 10 "Sorry, max %m users -- try again later"
#
# # Put the user into /pub right after login
DefaultChdir /pub
#
# # We want 'welcome.msg' displayed at login, '.message' displayed in
# # each newly chdired directory and tell users to read README* files.
DisplayLogin /welcome.msg
DisplayFirstChdir .message
DisplayReadme README*
#
# # Some more cosmetic and not vital stuff
# DirFakeUser on ftpadm
# DirFakeGroup on ftpadm
#
# # Limit WRITE everywhere in the anonymous chroot
# <Limit WRITE SITE_CHMOD>
# DenyAll
# </Limit>
#
# # An upload directory that allows storing files but not retrieving
# # or creating directories.
<Directory uploads/*>
AllowOverwrite yes
<Limit READ>
DenyAll
</Limit>
#
<Limit STOR>
AllowAll
</Limit>
<Directory>
/ftp
</Directory>
#
# # Don't write anonymous accesses to the system wtmp file (good idea!)
WtmpLog off
#
# # Logging for the anonymous transfers
# ExtendedLog /var/log/proftpd/access.log WRITE,READ default
# ExtendedLog /var/log/proftpd/auth.log AUTH auth
#
#</Anonymous>

vorte[x]
2004-02-19, 08:26 AM CST
Hi scorpion,

ServerType standalone
ServerType inetd


You need to comment one of those out by putting a pound sign (#) before the line. As you're not starting proftpd from inetd/xinetd, you should put it before this line so it reads...

ServerType standalone
#ServerType inetd


- V

scorpion
2004-02-19, 12:31 PM CST
ok i did that.
all is good dude i'm working,
even did a telnet:
.
[gto286@localhost gto286]$ telnet localhost 21
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 localhost FTP server (Version 5.60) ready.

so i know it's doing something, ftp is responding.
and to this end, i have been working over the conf file
i commented out.
#ServerType inetd

the rest i left alone.
ok so i got it working. i even tracked down the directory it logs into.
it's /var/ftp
but it comes up a blank page can't see my folders or files
so that's my current problem
ftp://gto286.dyndns.org:21

scorpion
2004-02-19, 04:25 PM CST
ok let's skip all this nonsence.
here's my current config file.
http://gto286.dyndns.org:7777/gto286/proftpd.conf
address for ftp.
ftp://gto286.dyndns.org:21
i just need ya to look at the conf file se if there's anything wrong there.
and there's gotta be away to fix the permissions prob so everyone can see the directories i have there.
it's in /var/ftp
i have /var/ftp/uploads
/var/ftp/files
/var/ftp/pid
no one can see the files,or uploads.or pid diretory(s)
when my people type in my ftp addy, i want them to see the folders, files and uploads

vorte[x]
2004-02-19, 08:05 PM CST
Chmod the folder(s) with the appropiate permissions (man chmod).

scorpion
2004-02-20, 08:25 PM CST
and how do i exactly do that.?
i know it's sounds stupid but i've done everthing i can figure out to do.
i even re installed vsftp i'm gonna give that a diff port #
if this don't work i'm basicly gonna uninstall all ftp services
go without it,,,,,,
i know that sounds like i'm giving up but i assure you i'm not
this is a challenge and i intend to defeat it, In anyway i can!


laterzzzzzzzzz
.....Sc.....