You are not logged in.

#1 2008-09-28 22:51:58

obsrv
Member
Registered: 2005-02-08
Posts: 137

ProFTPD no anonymous access

Here is my /etc/proftpd.conf:


# 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            "PIRATE.lt FTP Server"
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 under which the server will run.
User                ftp
Group                ftp

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite        on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous ~ftp>
   User                 ftp
   Group                ftp
   AnonRequirePassword  on
   MaxClients           50
   DisplayLogin         welcome.msg
   DisplayFirstChdir    .message

   <Limit WRITE>
     Deny from all
   </Limit>
   <Directory incoming>
     <Limit READ WRITE DIRS STOR CWD CDUP>
       AllowAll
     </Limit>
   </Directory>
</Anonymous>



And I cant login anonymous into ftp. Why? whats wrong? hmm


"god@heaven$ emerge world"

              ~ Genesis on Gentoo

Offline

#2 2008-09-29 00:31:37

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: ProFTPD no anonymous access

To login with the name 'anonymous' I think you need the line 

UserAlias anonymous ftp

inside the Anonymous section.

You should be able to login as 'ftp'.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#3 2008-09-29 00:35:05

obsrv
Member
Registered: 2005-02-08
Posts: 137

Re: ProFTPD no anonymous access

Now I can connect as anonymous but it puts into my home directory, I need to get into /home/ftp

Changed #DefaultRoot ~ to DefaultRoot /home/ftp
Then no anonymous access available.


"god@heaven$ emerge world"

              ~ Genesis on Gentoo

Offline

#4 2008-09-29 00:52:53

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: ProFTPD no anonymous access

Take a look at the 'ftp' entry in the '/etc/passwd/' file. It should be:

ftp:x:14:11:ftp:/home/ftp:/bin/false

If you use '/bin/false', dont forget to put it in '/etc/shells'


Follow me on twitter: https://twitter.com/johnbina

Offline

#5 2008-09-29 01:08:54

obsrv
Member
Registered: 2005-02-08
Posts: 137

Re: ProFTPD no anonymous access

I managed to get it working. after two days ArchLinux will have a new mirror in Lithuania smile thank you Mektub


"god@heaven$ emerge world"

              ~ Genesis on Gentoo

Offline

#6 2008-10-09 15:16:54

WeeDie
Member
Registered: 2008-10-09
Posts: 7

Re: ProFTPD no anonymous access

I had problems with this, and it took me quite a while to figure out what was wrong.

I used the template @ http://www.proftpd.org/docs/configs/anonymous.conf
and had all the accounts setup correctly.
I tried all sorts of directives to no avail. Always the same result.

Status:    Resolving address of shroomhost
Status:    Connecting to 192.168.1.100:21...
Status:    Connection established, waiting for welcome message...
Response:    220 ProFTPD 1.3.1 Server (ShroomFTP Anonymous Server) [192.168.1.100]
Command:    USER ftp
Response:    331 Anonymous login ok, send your complete email address as your password
Command:    PASS **************
Response:    530 Login incorrect.
Error:    Could not connect to server

After studying some old logs I found a reference to /etc/ftpusers. Apparently this list is used to deny users ftpaccess, and for some reason (probably a good one) my list was populated with all user accounts. Very useful!
I simply removed the user "ftp" from this list and Success!
Sadly, I couldn't see anyone mentioning it while googling the problem so I just thought I'd mention it somewhere.

Offline

Board footer

Powered by FluxBB