Blob Blame History Raw
# A basic anonymous configuration, with an upload directory
# Enable this with PROFTPD_OPTIONS=-DANONYMOUS_FTP in /etc/sysconfig/proftpd
<Anonymous ~ftp>
  User			ftp
  Group			ftp
  AccessGrantMsg	"Anonymous login ok, restrictions apply."

  # 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 "Sorry, max %m users -- try again later"

  # Put the user into /pub right after login
  #DefaultChdir		/pub

  # We want 'welcome.msg' displayed at login, '.message' displayed in
  # each newly chdired directory and tell users to read README* files.
  DisplayLogin		/welcome.msg
  DisplayChdir		.message
  DisplayReadme		README*

  # Cosmetic option to make all files appear to be owned by user "ftp"
  DirFakeUser		on ftp
  DirFakeGroup		on ftp

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

  # An upload directory that allows storing files but not retrieving
  # or creating directories.
  #
  # Directory specification is slightly different if mod_vroot is in
  # use: see http://sourceforge.net/p/proftp/mailman/message/31728570/
  #          https://bugzilla.redhat.com/show_bug.cgi?id=1045922
  <IfModule mod_vroot.c>
    <Directory /uploads/*>
      AllowOverwrite		no
      <Limit READ>
        DenyAll
      </Limit>

      <Limit STOR>
        AllowAll
      </Limit>
    </Directory>
  </IfModule>
  <IfModule !mod_vroot.c>
    <Directory uploads/*>
      AllowOverwrite		no
      <Limit READ>
        DenyAll
      </Limit>

      <Limit STOR>
        AllowAll
      </Limit>
    </Directory>
  </IfModule>

  # Don't write anonymous accesses to the system wtmp file (good idea!)
  WtmpLog			off

  # Logging for the anonymous transfers
  ExtendedLog			/var/log/proftpd/access.log WRITE,READ default
  ExtendedLog			/var/log/proftpd/auth.log AUTH auth

</Anonymous>