Sharing File Through FTP

Let’s say that you wanna share videos hosted in /home/user/Videos directory via FTP protocol. For this purpose, you have two options: 1) you copy all contents from /home/user/Videos to /home/ftp directory; 2) you can just enable access to /home/user/Videos directory.

If you choose the second option, you can follow the example below and make your machine accessible through FTP to all users (I mean, users in the same LAN that you are). Just make sure that you have installed vsftpd.

Binding directory

$ mkdir -p /home/ftp/Videos
$ mount --bind /home/user/Videos /home/ftp/Videos

Edit the configuration file /etc/vsftpd/vsftpd.conf to allow all users to access FTP server

listen=YES
listen_port=21
local_enable=NO
anonymous_enable=YES
anon_upload_enable=NO
write_enable=NO
anon_mkdir_write_enable=YES
anon_root=/home/ftp

Take your favorite browser and access the FTP server machine (i.e. IPv4: 10.0.0.1). Type ftp://10.0.0.1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s