User Tools

Site Tools


file_transfer_protocol_ftp

Introduction to File Transfer Protocol (FTP)

FTP is the easiest, most reliable way to transfer files over the Internet, and it’s something that every website owner should know how to use. While a web browser provides the user with the ability to download single files from a web page, FTP allows files to be transferred both to and from a web server en masse. FTP is also how we manage our websites, moving the files that comprise our site(s) from our desktop to our web server(s), where they can be seen by the world.

FTP is not only useful for managing your website, however. Many photographers and studios setup guest FTP accounts, allowing clients to log into the server to download images from a shoot. It’s an easy, reliable way to quickly send images from a shoot location to an advertising client’s office for proofing during a shoot, or to deliver retouched files to a client on deadline.

Whether being used for website management or digital asset delivery and sharing, FTP is an essential technology for photographers.

Demystifying FTP

According to Wikipedia, “File Transfer Protocol (FTP) is a network protocol used to exchange and manipulate files over a TCP computer network, such as the internet. An FTP client may connect to an FTP server to manipulate files on that server.” That sounds very technical — maybe even scary to some readers — but FTP, in practice, is very simple. For those who want a technical explanation, Wikipedia has you covered. For the rest of us, it’s enough to know that FTP provides a method of moving files from one location to another via the Internet.

If you’ve ever moved files from one folder to another on your desktop, then you’re already familiar with the fundamental principle of FTP. The difference is that you’re not moving files from one local location to another; you’re moving them from a local location to a remote location on your web server. But moving files is moving files. The concept is the same.

On a Mac, we use Finder to navigate our desktop and arrange our files; Windows users have Explorer. On the Internet, we use an FTP client to perform these tasks.

FTP Clients

An FTP client is a software application that provides a graphic user interface (GUI) for FTP.

Being a Mac user, my FTP client of choice is Panic’s Transmit. Panic’s Coda, my text-editor of choice, also includes FTP functionality, but has proven less reliable than Transmit for large transfers. Transmit costs $29.95.

While I prefer Transmit, there are a number of free FTP clients available for both Mac and Windows platforms. Mac users should check out Cyberduck, while FileZilla Client is available for Mac OS X, Windows and Linux.

Despite cosmetic differences, all FTP clients offer the same basic features. For the purposes of this article, it really doesn’t matter which you choose.

Setting Up FTP Accounts

FTP accounts are usually setup via your web server’s control panel. When you purchase web hosting, an FTP account will be setup for you by the host and the login details will be provided to you. Typically, all that is required to access your server via FTP is the server address, user name and password. In some cases, a port number or protocol will also be specified; most often, however, default values are acceptable.

To set up additional guest FTP accounts — for clients, site contributors, etc. — you will need access to your site control panel. Details for configuring additional user accounts are beyond the scope of this tutorial, but should be well documented in your host’s knowledge base.

Logging In

To access your site via FTP, you first have to login. You can configure your FTP client to do this for you.

When setting up your FTP client to connect to your server, you may be presented with more options than you need to worry about. This capture is from Transmit, configuring a new server connection. Beginning from the top, give your connection a name; the name of your website will usually suffice.

Next, provide the server address. Web-browsers usually access sites using an http:// address. For example, look to your address field now, and you should see that you’re reading my website from http://theturninggate.net/etc. Typically, when accessing your site via FTP, you would replace this with an ftp:// address. When I log into The Turning Gate, for example, I would set my server address to ftp://theturninggate.net. Your host will usually tell you the server address along with your login information, but it’s easy enough to guess that it’s your domain name, or ftp:// and your domain name.

User name and password are self-explanatory.

Unless your host tells you otherwise, you need not concern yourself with the Port. For Protocol, SFTP is more secure and should be used whenever possible. If your server will not connect using SFTP, then try FTP.

That done, you can hit the OK button to move on.

You should now have a server preset saved in your list of servers, which you can double-click at any time to log into your server.

Logging In

To access your site via FTP, you first have to login. You can configure your FTP client to do this for you.

Setting up your FTP client to connect to your web server, you will likely be asked to fill in more information than you actually need. The main items to concern yourself with are the server, username, password, port and protocol.

Web-browsers usually access sites using an http:// address. For example, look to your address field now, and you should see that you’re reading my website from http://theturninggate.net/etc. Typically, when accessing your site via FTP, you would replace this with an ftp:// address. When I log into The Turning Gate, for example, I would set my server address to ftp://theturninggate.net. Your host will usually tell you the server address along with your login information, but it’s easy enough to guess that it’s your domain name, or ftp:// followed by your domain name.

User name and password are self-explanatory.

Unless your host tells you otherwise, the default Port value will likely suffice. For Protocol, SFTP is more secure and should be used whenever possible. If your server will not connect using SFTP, then try FTP.

That done, you can hit the OK button to move on.

You should now have a server preset saved in your list of servers, which you can double-click at any time to log into your server.

The Root

The “root” of your server is where users are directed when they input your web address into their browser. The front page of your website should always be located in the root.

When you first log into your server, you may be presented with a number of oddly named folders. Your first task is to locate the root, which will usually be in a folder named /httpdocs/, /htdocs/, /www/ or /public_html/. Again, consult with your host’s documentation if you have difficulty locating the appropriate folder.

When a visitor accesses your site by URL, www.domainname.com, they will automatically be directed to your index file — usually either index.html or index.php, depending on which is present. It’s important to understand that:

www.domainname.com = www.domainname.com/index.html

If no index.html (or index.php) file is present at the root, visitors will receive a File Not Found error when accessing your domain name, www.domainname.com, even if there are other files present at the root.

For any other file to be accessed at root, the file name must also be supplied. Example, www.domainname.com/about.html or www.domainname.com/contact.html.

Folder Structure

Just like on your desktop, the contents of your web server should be organized into folders. Folders might contain periphery files for your site, such as Javascripts, CSS files or images used in your site design. Folders can also be used to organize your site’s pages and resources. A folder might contain a web photo gallery, for example.

Folders can sit in your root, alongside your index.html file, or can sit as sub-folders within a folder. To access folders, simply add the path to your domain. If you have a gallery folder named “gallery” sitting in your root, then you would access it in a web-browser via the address www.domainname.com/gallery/.

The same file rules for the root apply to folders. Thus:

www.domainname.com/gallery/ = www.domainname.com/gallery/index.html

Sub-folders can be nested inside folders to an infinite depth, and are accessible by extending the path, like this:

www.domainname.com/gallery_index/gallery01/

Ultimately, your folder structure (a.k.a. directory structure) will determine how your website menu should be laid out. Depending on where you place your pages and photo galleries, your menu will need to point to each relevant file at its respective location.

Coda

And that’s the gist of FTP. I hope you’ve found this helpful. If anything seems unclear, or not fleshed out as well as it should be, let me know and I’ll update this post as necessary.

file_transfer_protocol_ftp.txt · Last modified: 2016/04/07 07:01 by matthew