736bbf6
# A basic anonymous configuration, with an upload directory
736bbf6
# Enable this with PROFTPD_OPTIONS=-DANONYMOUS_FTP in /etc/sysconfig/proftpd
736bbf6
<Anonymous ~ftp>
736bbf6
  User			ftp
736bbf6
  Group			ftp
736bbf6
  AccessGrantMsg	"Anonymous login ok, restrictions apply."
736bbf6
736bbf6
  # We want clients to be able to login with "anonymous" as well as "ftp"
736bbf6
  UserAlias		anonymous ftp
736bbf6
736bbf6
  # Limit the maximum number of anonymous logins
736bbf6
  MaxClients		10 "Sorry, max %m users -- try again later"
736bbf6
736bbf6
  # Put the user into /pub right after login
736bbf6
  #DefaultChdir		/pub
736bbf6
736bbf6
  # We want 'welcome.msg' displayed at login, '.message' displayed in
736bbf6
  # each newly chdired directory and tell users to read README* files. 
736bbf6
  DisplayLogin		/welcome.msg
736bbf6
  DisplayChdir		.message
736bbf6
  DisplayReadme		README*
736bbf6
736bbf6
  # Cosmetic option to make all files appear to be owned by user "ftp"
736bbf6
  DirFakeUser		on ftp
736bbf6
  DirFakeGroup		on ftp
736bbf6
736bbf6
  # Limit WRITE everywhere in the anonymous chroot
736bbf6
  <Limit WRITE SITE_CHMOD>
736bbf6
    DenyAll
736bbf6
  </Limit>
736bbf6
736bbf6
  # An upload directory that allows storing files but not retrieving
736bbf6
  # or creating directories.
736bbf6
  #
736bbf6
  # Directory specification is slightly different if mod_vroot is in
736bbf6
  # use: see http://sourceforge.net/p/proftp/mailman/message/31728570/
736bbf6
  #          https://bugzilla.redhat.com/show_bug.cgi?id=1045922
736bbf6
  <IfModule mod_vroot.c>
736bbf6
    <Directory /uploads/*>
736bbf6
      AllowOverwrite		no
736bbf6
      <Limit READ>
736bbf6
        DenyAll
736bbf6
      </Limit>
736bbf6
736bbf6
      <Limit STOR>
736bbf6
        AllowAll
736bbf6
      </Limit>
736bbf6
    </Directory>
736bbf6
  </IfModule>
736bbf6
  <IfModule !mod_vroot.c>
736bbf6
    <Directory uploads/*>
736bbf6
      AllowOverwrite		no
736bbf6
      <Limit READ>
736bbf6
        DenyAll
736bbf6
      </Limit>
736bbf6
736bbf6
      <Limit STOR>
736bbf6
        AllowAll
736bbf6
      </Limit>
736bbf6
    </Directory>
736bbf6
  </IfModule>
736bbf6
736bbf6
  # Don't write anonymous accesses to the system wtmp file (good idea!)
736bbf6
  WtmpLog			off
736bbf6
736bbf6
  # Logging for the anonymous transfers
736bbf6
  ExtendedLog			/var/log/proftpd/access.log WRITE,READ default
736bbf6
  ExtendedLog			/var/log/proftpd/auth.log AUTH auth
736bbf6
736bbf6
</Anonymous>