Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just set up a Ubuntu system and I want to use it to host some files so that people can download them with some sort of link I send them. I have a cable modem connection to the net and my provider is RoadRunner.

Is there a simple way to do this with Ubuntu as an FTP server, Web server or some other configuration? I am new to Ubuntu and Unix/Linux so I know very little about getting it to do much at the command-line level.

Thanks.

share|improve this question
add comment

1 Answer

As a matter of fact I just did this today.

  1. Install vsftpd with your favourite package manager.

    sudo apt-get install vsftpd

  2. Create a new user with the FTP's root folder as its home folder.

    sudo mkdir /home/ftp/
    sudo useradd -b /home/ftp/ -d /home/ftp/ -u 231 ftpuser
    

    You can replace ftpuser by whatever username you'd like it to have, but just ftp doesn't seem to work (or at least, it didn't work for me).

    And then, to specify the password for the just created used, type sudo passwd ftpuser, and type the desired password 2 times.

After you've followed those 2 steps, people can just type ftp://your-ip in their address bar, and enter the information specified above to be able to download files from the /home/ftp folder.


But be warned

I just explained you the basics. With this simple configuration people will be able to access all files on your computer which they have permissions for, also files outside of the home folder! They will not be able to write to them though.


Additional notes

If you don't want people to have to enter a username and password, there is a configuration line for vsftpd which allows anonymous users to connect. The configuration file is located in /etc/vsftpd.conf. After you've changed somethinh in the configuration file, run sudo service vsftpd restart to apply the new configuration.

share|improve this answer
1  
If you have a router, you are likely going to need to forward port 21 to the computer to the computer you are using to host the files. Unless you are a business class user your typical cable modem service will not come with a static IP address. While typically the IP that give you dynamically doesn't change often, you may want to consider using a dynamic DNS service with your set up so that users can always get to your FTP server via name. Many routers have this automatically built in. Some providers can be found here: dnslookup.me/dynamic-dns –  Kendor Dec 10 '11 at 21:33
    
Thank you! So far, your advice has been right on the money. I have the ftp system setup and am trying to copy some files into the folder to test a download. However, it is telling me I don't have permission to see the content of the Root directory and I can't copy anything to it. My user account indicates I am the Administrator, so I'm not sure what to do next. Sorry for the newbie question. How do I get permission to copy and use that folder? –  Matt Dec 11 '11 at 2:29
    
Run gksu nautilus. Your file manager will open with root permissions, which means that you can access every part of your system. Be careful! –  RobinJ Dec 11 '11 at 9:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.