LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Trouble getting anonymous ftp server working (https://www.linuxquestions.org/questions/linux-general-1/trouble-getting-anonymous-ftp-server-working-26423/)

glock19 07-23-2002 07:12 PM

Trouble getting anonymous ftp server working
 
I need some help getting my anonymous ftp server working.

This is a Slackware 8.1 system. It's a minimal install of slack, basically just the kernel, bash, some networking utils, development tools, and that's all.

I already installed and setup ssh. Next step is to get an anonymous ftp server working.

Well, I downloaded ProFTPD 1.2.5. I compiled and installed it. I read all the instructions, and everything seems correct in my setup.

well, from another system, when I ftp to the proftpd server and login as user "anonymous" or "ftp", I get an error:

Quote:

530 Login incorrect.
Login failed.
Any ideas what the problem is? Thanks for helping.

trickykid 07-23-2002 07:39 PM

You need to comment out or delete out the line that says ftp in your /etc/ftpusers file.. that should enable anonymous login.

glock19 07-23-2002 07:47 PM

Yikes, I don't have a /etc/ftpusers files. What should I do now?

trickykid 07-23-2002 07:50 PM

Try this site out: http://www.proftpd.org/docs/faq/proftpdfaq-5.html#ss5.1

glock19 07-23-2002 07:57 PM

Thanks. But I don't want to add another anonymous user. I just want the clients to be able to login as user "anonymous" with no password requirement and get access to a chroot jail that I setup.

trickykid 07-23-2002 08:12 PM

I found this on a site, might help, try to compare it to your own config file:

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on

# 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

# 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 nobody
Group nogroup

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>

# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group ftp
# 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

# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>

</Anonymous>

First thing we are going to do is configure the server for our new site so we need to change the line with:


ServerName "ProFTPD Default Installation"

to whatever you want displayed as the server name, this is what is displayed as people login to your site. For this example I am going to use Red Hat Software. So it now looks like:


ServerName "Red Hat Software FTP server"

Next we want to look at the ServerType, you'll need to decide if you want this to run all the time(i.e. Like, sendmail, named etc) or as an inetd daemon, which means the server will start and stop when connections come and go. I prefer to run it from inetd, so I change the entry to look like:


ServerType inetd

Note: If you run this from inetd you must edit /etc/inetd.conf to have an entry like:


ftp stream tcp nowait root /usr/sbin/proftpd proftpd

For a standalone you don't need to worry about this. You don't have to change anything for the Port or Umask options unless you want to do so. I leave the User as nobody, and change the group to nobody. So those lines look like:


User nobody
Group nobody

Now you'll need to decide about the files, I don't like having files overwriteable, so I change this line to:


<Directory /*>
AllowOverwrite off
</Directory>

fatgod 07-24-2002 05:20 AM

Quote:

Originally posted by glock19
Thanks. But I don't want to add another anonymous user. I just want the clients to be able to login as user "anonymous" with no password requirement and get access to a chroot jail that I setup.
You _must_ have a real user on your system that is going to be used by ftpd to manage anonymous logins. this is usually the account 'ftp' read the ftpaccess manpage for directions on allowing uploads and chroot'ing anon users, and loads of other good stuff you can do.

glock19 07-24-2002 11:57 AM

I do have user "ftp" and also a group "ftp". So why can't I log in as anonymous?

My config looks identical to the one posted by trickykid.

glock19 07-25-2002 12:33 PM

Does anyone have any ideas on what my problem is with getting an anonymous login to be accepted by my ftp server? Thanks.

fatgod 07-28-2002 05:29 AM

can you post the out put from the ftp client when trying to login as anon please?

glock19 07-29-2002 11:11 AM

[user@space user]$ ftp 192.168.168.8
Connected to 192.168.168.8.
220 ProFTPD 1.2.5 Server (ProFTPD Default Installation) [slack81.comp.com]
500 AUTH not understood.
500 AUTH not understood.
KERBEROS_V4 rejected as an authentication type
Name (192.168.168.8:user): anonymous
331 Anonymous login ok, send your complete email address as your password.
Password:
530 Login incorrect.
Login failed.
ftp>

bbeers 07-29-2002 11:24 AM

Do you have a /home/ftp directory? I've seen ftp connections fail if the user's home directory was missing.

-Bob

glock19 07-29-2002 12:21 PM

Yes, I do. At first I didn't, but then I made one and it still does not work.

fatgod 08-03-2002 07:58 AM

Um, I assume that proftpd uses the /etc/ftpaccess file to configure the server. So... can you post the contents of that file. there are some things that must be there in order to allow logins in the first place, and what is the home dir of the user ftp, and is it publicly accessable?

The kerberos error looks interesting. Do you think that you could fix that? It might have something to do with your problem also, though I'm not sure about that...

glock19 08-05-2002 11:06 AM

I don't have an /etc/ftpaccess file. What should I do?


All times are GMT -5. The time now is 09:22 PM.