You are not logged in.

#1 2008-08-21 04:47:04

justindisgustin
Member
Registered: 2008-08-13
Posts: 7

Help with PROFTPD config file and /etc/passwd file [SOLVED]

So I'm trying to use proftpd to set up a file server and I'm having a bit of trouble.  Here's what I've got so far.

/etc/passwd:

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
mail:x:8:12:mail:/var/spool/mail:/bin/false
http:x:33:33:http:/srv/http:/bin/false
nobody:x:99:99:nobody:/:/bin/false
dbus:x:81:81:System message bus:/:/bin/false
avahi:x:84:84:Avahi daemon:/:/bin/false
hal:x:82:82:HAL daemon:/:/bin/false
justin:x:1000:100:Justin Franza,,,:/home/justin:/bin/bash
ftp:x:1001:100::/home/ftp:/bin/bash

/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            "J Money Millionaire Disgusting File 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                nobody
Group                nobody

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

  # 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
  DisplayChdir            .message

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

I followed http://docs.hp.com/en/B2355-90685/ch02s07.html#bcfdegfe to do some of my setup.

The problem I am having now is that when I go to my server, none of my directories are showing up.  I'm sure I'm missing something fairly obvious.

The group ftpusers I created just using the defaults when i did groupadd.

Thanks in advance!

BTW: I can provide the URL for my site if it would help anyone but there's not anything showing up in it right now.

Last edited by justindisgustin (2008-08-21 20:02:50)

Offline

#2 2008-08-21 06:21:56

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: Help with PROFTPD config file and /etc/passwd file [SOLVED]

you SHOULD in any case uncomment the "DefaultRoot ~" line. otherwise anonymous users can browse through your filesytem like a real user!

i have no idea why hp wants you to create /usr/bin with ls and pwd in it, as those are basic ftp commands any client should be able to do


btw: this guide is for HP-UX, maybe their system behaves different


edit:
you should change the shell of user "ftp" to /bin/false instead of /bin/bash

Last edited by robmaloy (2008-08-21 06:24:04)


☃ Snowman ☃

Offline

#3 2008-08-21 20:05:30

justindisgustin
Member
Registered: 2008-08-13
Posts: 7

Re: Help with PROFTPD config file and /etc/passwd file [SOLVED]

RobMaloy:
Thanks!  I will make those changes you mentioned.

I am pretty sure I got it fixed.  The problem seemed to be that I had not forwarded ports properly in my router's configuration.

Offline

Board footer

Powered by FluxBB