Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - How to setup an anonymous FTP download server

#1
How to setup an anonymous FTP download server

Sometimes you may not need to set up a full FTP server with authenticated users with upload and download privileges. If you are simply looking for a quick way to allow users to grab a few files, an anonymous FTP server can fit the bill. This article shows you show to set it up.

This example uses the vsftp server.

Installing and configuring the anonymous FTP server


Install the vsftp server using sudo:

$ sudo dnf install vsftpd

Enable the vsftp server.

$ sudo systemctl enable vsftpd

Next, edit your /etc/vsftpd/vsftpd.conf file to allow anonymous downloads. Make sure you have the following entries.

anonymous_enable=YES

This option controls whether anonymous logins are permitted or not. If enabled, both the usernames ftp and anonymous are recognized as anonymous logins.

local_enable=NO

This option controls whether local logins are permitted.

write_enable=NO

This option controls whether any FTP commands which change the filesystem are allowed.

no_anon_password=YES

When enabled, this option prevents vsftpd from asking for an anonymous password. With this setting, the anonymous user will log straight in without one.

hide_ids=YES

Enable this option to display all user and group information in directory listings as ftp.

pasv_min_port=40000
pasv_max_port=40001

Finally, these options set the minimum and maximum port to allocate for PASV style data connections. Use them to specify a narrow port range to assist firewalling. You should choose a range for ports that aren’t currently in use. This example uses port 40000-40001 to limit the ports to a range of 1.

Final steps


Now that you’ve set the options, add the appropriate firewall rules to allow vsftp connections along with the passive port range you specified.

$ firewall-cmd --add-service=ftp --perm
$ firewall-cmd --add-port=40000-40001/tcp --perm
$ firewall-cmd --reload

Next, configure SELinux to allow passive FTP:

$ setsebool -P ftpd_use_passive_mode on

And finally, start the vsftp server:

$ systemctl start vsftpd

At this point you have a working FTP server. Place the content you want to offer in /var/ftp. (Typically, system administrators put publicly downloadable content under /var/ftp/pub.) Now you can connect to your server using an FTP client on another system.


Image courtesy of Tom Woodward on Flickr, CC-BY-SA 2.0.



https://www.sickgaming.net/blog/2019/10/...ad-server/
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Fedora - Contribute at Fedora Linux 34 Upgrade, Audio, and Virtualization test days xSicKxBot 0 12 04-06-2021, 10:27 AM
Last Post: xSicKxBot
  Fedora - Fedora Council statement on Richard Stallman rejoining FSF Board xSicKxBot 0 13 04-03-2021, 11:11 AM
Last Post: xSicKxBot
  Fedora - Announcing the release of Fedora Linux 34 Beta xSicKxBot 0 26 03-24-2021, 02:28 PM
Last Post: xSicKxBot
  Fedora - Fedora Workstation 34 Feature Focus: Updated Activities Overview xSicKxBot 0 31 03-17-2021, 03:08 PM
Last Post: xSicKxBot
  Fedora - How to use Poetry to manage your Python projects on Fedora xSicKxBot 0 30 03-09-2021, 10:57 AM
Last Post: xSicKxBot
  Fedora - Getting started with COBOL development on Fedora Linux 33 xSicKxBot 0 38 02-28-2021, 01:55 PM
Last Post: xSicKxBot
  Fedora - Contribute at the Fedora Audio, Kernel 5.11 and i18n test days xSicKxBot 0 49 02-26-2021, 01:09 PM
Last Post: xSicKxBot
  Fedora - Installing Nextcloud 20 on Fedora Linux with Podman xSicKxBot 0 73 02-16-2021, 07:51 AM
Last Post: xSicKxBot
  Fedora - Fedora Aarch64 on the SolidRun HoneyComb LX2K xSicKxBot 0 74 02-09-2021, 08:05 AM
Last Post: xSicKxBot
  Fedora - Astrophotography with Fedora Astronomy Lab: setting up xSicKxBot 0 67 02-06-2021, 04:07 AM
Last Post: xSicKxBot

Forum Jump:

[-]
Active Threads
News - Nintendo Actually Responded To A ...
Last Post: xSicKxBot
Today 01:50 AM
» Replies: 0
» Views: 5
News - Rumour: Dragon Ball Z: Kakarot Co...
Last Post: xSicKxBot
Today 01:50 AM
» Replies: 0
» Views: 5
Xbox Wire - Next Week on Xbox: April 6 t...
Last Post: xSicKxBot
Yesterday 11:48 PM
» Replies: 0
» Views: 7
News - Ubisoft hires ex-Uber HR director...
Last Post: xSicKxBot
Yesterday 11:48 PM
» Replies: 0
» Views: 12
News - Blog: An essential guide to live ...
Last Post: xSicKxBot
Yesterday 11:48 PM
» Replies: 0
» Views: 10
[Tut] Python Dash Book
Last Post: xSicKxBot
Yesterday 05:52 PM
» Replies: 0
» Views: 6
(Indie Deal) Adventure Tales Bundle, Qua...
Last Post: xSicKxBot
Yesterday 05:52 PM
» Replies: 0
» Views: 7
News - Good Job! Is The Next Nintendo Sw...
Last Post: xSicKxBot
Yesterday 05:49 PM
» Replies: 0
» Views: 8
News - Random: Halo Instagram Shows Off ...
Last Post: xSicKxBot
Yesterday 05:49 PM
» Replies: 0
» Views: 7
News - Guide To Refresh Rates And Respon...
Last Post: xSicKxBot
Yesterday 05:49 PM
» Replies: 0
» Views: 16

[-]
Twitter

[-]
Sponsored
Get the Deal of the Week at RefurBees.com

Copyright © SickGaming.net 2012-2020