[Lancaster] Setting up ftp server

Andy Baxter andy at earthsong.free-online.co.uk
Thu May 6 23:23:06 BST 2004


On Thursday 06 May 2004 22:40, Ken Hough wrote:
> Help!
>
> I'm trying to understand how to set up ftp.
>
> I've got a server running, as shown via a browser under
> 'ftp://localhost:21'. I get directories shown as follows:
>
> bin, dev, etc, lib, msgs, pub, usr
>
> I can use 'ftp localhost' to log into and access user accounts and
> transfer files.
>
> If I login as 'anonymous' or 'ftp', I only get the directories listed
> above.
>
> Problem is that I cannot figure out how to add anything to the 'pub'
> directory to do anything useful. I can find lots of info on how to use
> ftp client, but nothing on how to manage/setup the server. Can anybody
> point me in the right direction?
>
> What I wish to do presently is to set up ftp access to the DVD so as to
> do a remote ftp install of Debian. I've done remote installs with SuSE,
> but this allows installation via NFS, which I understand. Debian does
> not appear to cater for NFS.
>
> Regards
>
> Ken Hough

I use proftpd, which works OK with the standard debian config (included 
below). Most likely the problem is with file permissions. What you need to 
know is which username the ftp daemon uses for anonymous connections - 'ftp' 
in the standard debian setup. Then make sure the files you want to access 
anonymously are readable by this user. E.g. as root, go into the relevant 
directory and do 'chown ftp *'. Or to do this for all subdirectories, do 
'find /var/ftp/pub -print0 | xargs -0 chown ftp'. Alternatively, leave the 
ownership as it is, but make the files world-readable using 'chmod o+r *'

$ cat /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/nogroup" and "ftp" for normal operation and anon.
 
ServerName                      "Debian"
ServerType                      standalone
DeferWelcome                    off
 
MultilineRFC2228                on
DefaultServer                   on
ShowSymlinks                    on
AllowOverwrite                  on
 
TimeoutNoTransfer               600
TimeoutStalled                  600
TimeoutIdle                     1200
 
DisplayLogin                    welcome.msg
DisplayFirstChdir               .message
ListOptions                     "-l"
 
DenyFilter                      \*.*/
 
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
#PersistentPasswd               off
 
# Uncomment this if you would use TLS module:
#TLSEngine                      on
 
# Uncomment this if you would use quota module:
#Quotas                         on
 
# Uncomment this if you would use ratio module:
#Ratios                         on
 
# Port 21 is the standard FTP port.
Port                            21
 
# 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
 
<Directory /*>
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
  Umask                         022  022
# Normally, we want files to be overwriteable.
  AllowOverwrite                on
</Directory>
 
# A basic anonymous configuration, no upload directories.
 
<Anonymous ~ftp>
  User                          ftp
  Group                         nogroup
  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous ftp
 
  RequireValidShell             off
 
  # 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
  <Directory *>
    <Limit WRITE>
    DenyAll
    </Limit>
    </Directory>
  
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask to prevent new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask                           022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
 </Anonymous>



>
> _______________________________________________
> Lancaster mailing list
> Lancaster at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/lancaster

-- 
Please don't send me html mail or un-notified attachments. These will be 
automatically filed under 'probable spam' unless I'm expecting an email which 
hasn't come.
If you do need to send an attachment or html mail, put [attachment] or [html] 
in the subject line.
Thanks, andy.



More information about the Lancaster mailing list