# Help ProFtpd config

## _SkeLeToN_

Ok guys I made some search over the gentoo forum and google but I still have a hard time to understand the $#%#$%# config file.

The exemple I have and found is always with anonymous login. I DON'T WANT ANONYMOUS.  I just want a specific user to log into my serv with a valid password. 

Now I have set proftpd as inedt.  Now one question why they set user and group to ftp or nobody ??? I suppose this is when you run it as standalone right ?  

Also I want my user to log into /home/ftp and they can go back (chroot).

inside the /home/ftp i will have  upload and stuff where stuff you can only read.  

This is what I have for my conf file right now 

```

ServerName                      "SkeL's ftp"

ServerType                      inetd

DefaultServer                   on

# Port 21 is the standard FTP port.

Port                                  21

TimeoutLogin                     120

TimeoutIdle                       900

TimeoutNoTransfer             900

TimeoutStalled                   3600

DeferWelcome                    off

UseReverseDNS                  ofF

ScoreboardPath                  /var/run/proftpd

TransferLog                     /var/spool/syslog/proftpd/xferlog.legacy

LogFormat                       default "%h %l %u %t \"%r\" %s %b"

LogFormat                       auth    "%v [%P] %h %t \"%r\" %s"

LogFormat                       write   "%h %l %u %t \"%r\" %s %b"

Umask                           022

MaxInstances                    30

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

User                            ftp  DO I NEED THAT ?????

Group                           ftp

<Global>

        DisplayLogin               welcome.msg

        DisplayFirstChdir          readme

        #

        # having to delete before uploading is a pain ;)

        #

        AllowOverwrite             yes

        #

        # Turn off Ident lookups

        #

        IdentLookups         off

        #

        # Logging

        #

        # file/dir access

        #

        ExtendedLog             /var/spool/syslog/proftpd/access.log WRITE,READ write

        #

        #

        # Record all logins

        #

        ExtendedLog             /var/spool/syslog/proftpd/auth.log AUTH auth

</Global>

```

Its after that when you set for the home base and perm I'm confuse .... do I need to use anonymous or another rule for a specific user.  

Damn why they make the config file so complicated.

----------

## Xinos

You might try looking at Pam to see if it is setup correctly

http://proftpd.linux.co.uk/localsite/Userguide/linked/x706.html

You might also try this website it shows some example setup and configs and I think this might help you. I am running proftpd also but I have just been using anonymous let me know if you get it. I would like to see your config file. Let me know how it goes good luck.

----------

## Xinos

Here is the website sorry i forgot it:

http://www.ibiblio.org/pub/packages/solaris/sparc/html/proftpd.1.2.0.p10.html

Okay maybe that is it this time.

----------

## fmalabre

Well, I read the doc, and I have the same issue with ProFtp. I will give it another try and let you know...

----------

## -- Thor --

Here's a portion of my proftd.conf file.  What this portion does is 1) sets up the chroot environment, and 2) shows you how to set up an anonymous ftp server.  However if you don't want an anonymous server *keep* the user 'ftp' in /etc/ftpusers.  If you do keep the user  'ftp' in /etc/ftpusers then they can't log in anonymously.

```

# Normally, we want files to be overwriteable.

<Directory /*>

  AllowOverwrite                on

</Directory>

<VirtualHost xxx.xxx.xxx.xxx>

<Directory /*>

  AllowOverwrite        on

</Directory>

ServerName "My Virtual FTP Server"

ServerIdent     off

DisplayConnect /etc/welcome.msg

#Jail them bastages

DefaultRoot ~

</VirtualHost>

# A basic anonymous FTP server configuration.

# To enable this, remove the user ftp from /etc/ftpusers.

<Anonymous ~ftp>

  RequireValidShell             off

  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                    50

  # We want 'welcome.msg' displayed at login, and '.message' displayed

  # in each newly chdired directory.

  DisplayLogin                  /etc/welcome.msg

  DisplayFirstChdir             .message

  # Limit WRITE everywhere in the anonymous chroot

  <Limit WRITE>

    DenyAll

  </Limit>

  # An upload directory that allows storing files but not retrieving

  # or creating directories.

#  <Directory incoming/*>

#    <Limit READ>

#      DenyAll

#    </Limit>

#

#    <Limit STOR>

#      AllowAll

#    </Limit>

#  </Directory>

</Anonymous>

```

I hope that helps you in configuring your server.

----------

## _SkeLeToN_

Ok I follow the link you put and with the snapshot of Thor config file I tried to configure my ftp here some problem I encounter.

 *Quote:*   

> 
> 
> ServerName                      "SkeL's ftp"
> 
> ServerType                      inetd
> ...

 

Now When I log it says :

 *Quote:*   

> 
> 
> ProFTPD 1.2.6 Server (SkeL's ftp) [Zeus.homelinux.com]
> 
> Logging in...                                                                   
> ...

 

1) I DO NOT want this to be shown on the screen : Anonymous login ok, send your complete email address as your password.

2) When I put the alias skeleton ftp so that means when I log as skeleton it will be the user ftp that will log... its only an aliases.  Now the password I enter is the password of ftp right ?  I try skeleton pass: (pass of user ftp).  I also try as the ftp user itself wont even let me type the password.  I know the password is good because I can make a session with ftp and the password is valid.  

3) The /etc/ftpusers do not exist on my systeme so I create the file and put the ftp inside and save but still can log into.

sorry for the long post but I want to be sure to give all the info you need to help me out.

Thx

----------

## perra

In one of the sample configs at the ProFTPD site (http://www.proftpd.org/docs/anonymous.conf) there is a directive called "AnonRequirePassword on" which may do the job.

See http://www.proftpd.org/docs/directives/linked/config_ref_AnonRequirePassword.html.  

HTH

----------

## _SkeLeToN_

even if put this i still get a bad password ... I dont understand.

----------

## Messiah

If you do not want to have anonymous ftp, why do you have this in your config?

```

# A basic anonymous configuration, no upload directories.

<Anonymous /home/ftp>

User ftp

Group ftp

UserAlias skeleton ftp

MaxClients 5

DisplayLogin /etc/welcome.msg

DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot

<Limit WRITE>

DenyAll

</Limit>

<Directory upload/*>

<Limit READ>

AllowAll

</Limit>

<Limit STOR>

AllowAll

</Limit>

</Directory>

</Anonymous>

```

----------

## _SkeLeToN_

I asked that question on my first post and no one answer me. Also I dunno which directive is for specific user instead of anonymous.

I know you can ftp on your account but I want a ftp with a specific user that will log into /home/ftp.

Damn this proftpd is real pain in the ass to configure .... is there other package that will do ??? ( and still secure )

----------

## perra

Hmm... Have user ftp a valid shell in /etc/passwd? If it's nothing, /bin/false or something similar you may want to use the "RequireValidShell off" directive. 

http://www.proftpd.org/docs/directives/linked/config_ref_RequireValidShell.html

HTH

----------

