24 Jun

Linking Directly To Files In Your FTP Account

One question we hear again and again is "how can I link to one file in my account?" For most people, using our Send Files or Shared Foldersis plenty. If you're looking for an even more flexible and powerful way to share files from your account, read on for how to set up direct FTP links.

What Is A Direct FTP Link?

One of the sneaky, hidden features of an FTP server is the ability to link to a specific file or folder in your acount. Direct FTP links can be used just like normal website links -- you can embed them in your own website or even paste them into an email.

How to Create A Direct FTP Link

The format to create your own link is really simple, you'll need:
  • a username that can access your file
  • the password for that user
  • your server address
  • the location of your file within your account
Once you have all those pieces, just mash 'em all together like so:

Just replace the blue parts with your information and then remove any extra spaces.

A Working Example

Now let's try that with a real file on a real server. First we gather the info we need:
  • a username - We'll use a special account for this example. The username is links
  • the password - The password for our user is pass
  • server address - We have a test server for just this sort of thing at test.exavault.com
  • our filename or location - We'll try to grab a file in the home folder of our account named transer.pdf
Next, we glue all those pieces together and get: ftp://links:pass@test.exavault.com/transfer.pdf

Go ahead, click the link to see an old marketing document of ours. By clicking the link, you logged into our test account as the user "links" with the password "pass" and downloaded the transfer.pdf document in the root folder. Best of all, you didn't have to leave your browser or do anything fancy. Nifty, huh?


You probably saw that the username and password are included in that link, and that probably freaked you out, if only a little. Does this mean that your password is now publicly exposed for everyone to see? Yep, that's exactly what that means! So here's an important rule of thumb for you...

Never, ever, EVER use your master username for an FTP URL.


In fact, you should never use any username who has the ability to upload, delete, or do anything but download in an FTP URL. Just like we did, with our links user, you should create a user account that can do nothing but download. Follow the instructions in our help documentation for user setup to create a user that has all permissions turned OFF except "Download files and folders"

Or, You Could Not Use The Password...

If you leave the password out of your link, then the format becomes:

Just like before, replace the parts in blue and take out the spaces to get your link.  So our sample link from earlier is now: ftp://links@test.exavault.com/transfer.pdf. When you click on that link, you'll be prompted to enter the password (it's pass). This approach is much more secure, but also more work for anyone who clicks on it.

File Locations

The most complex part of your link might actually be the "location of your file or folder." If you're trying to share a file which is actually tucked away under a bunch of layers of folders, the link can get pretty comples. For example, if my file is actually located at /Customers/Archived/2012/Western/Oregon/Beaverton/Amy's Cat.jpg, then my link has to direct us all the way to the correct folder to get my file. There's two ways to accomplish this:
  1. Type out the whole path to my file with all the folders in between, OR
  2. Set the home folder for my special link user to the folder that contains my file
Which approach you choose is entirely up to you. The first option will mean you don't need to set up special users for each folder that contains a file you want to share, which is a time-saver. The second option means that you're not giving away extra information about how your account is set up.

Here's that file with both options
  1. With the whole path: ftp://links:pass@test.exavault.com/Customers/Archived/2012/Western/Oregon/Beaverton/Amy's Cat.jpg
  2. By creating another user whose home folder is that Beaverton folder: ftp://links_beaverton:97007@test.exavault.com/Amy's Cat.jpg

Encoding Your Link

Did you catch the sneaky thing we did there with Amy's Cat.jpg? Did you see that the link to the file was actually something like Amy%27s%20Cat.jpg? There's a good reason for that.

Sometimes, your link will contain characters that cause it to break. For example, if your filename has spaces like "filezilla optimal settings.pdf." If we tried to make a link on our test server to this file, we'd get ftp://links:pass@test.exavault.com/filezilla optimal settings.pdf, which won't always work, depending on your browser.

In order to use the link, you'll need to encode the part that points at your file. Encoding just means that you take the characters that break your link (like spaces) and you replace them with gibberishy looking stuff that is less confusing to computers. For example, our encoded link to the FileZilla optimal settings document is actually ftp://links:pass@test.exavault.com/filezilla%20optimal%20settings.pdf Yuck!

To help you out, we've added a form at the bottom of the page for encoding your links. Just paste the path to your file or folder into the big text area, then hit the encode button underneath. You can then copy the results from that box into your new link, which is now ready to be posted on your web site or used in an email.

You Can Do It!

In the words of leading environmentalist Captain Planet, "The power is yours!" Your ExaVault account includes the ability to create these direct FTP links, and by making use of user restrictions like home folders and user permissions, you can share your file while keeping your account secure. There's no limit on the number of direct FTP links you use, and access is tracked in your activity log. So get on out there and start linking!

Handy-Dandy Encoder

Just paste in your file path and click the Encode button!

More news...