Skip to content
Juan J. Martínez edited this page Aug 29, 2013 · 7 revisions

Quick Start

This is a recipe to start using ftpcloudfs for personal use.

1. Install ftpcloudfs and its dependencies

There are different ways of installing the server (check https://github.com/chmouel/ftp-cloudfs/blob/master/README.rst), but we are going to use the simplest one: virtualenv + pip.

The package requires Python 2 (2.7 or later). You can check your Python version with:

python --version

You need to install virtualenv. I recommend you use you system's package manager (if available).

For example, in Fedora you can install virtualenv with (as root):

yum install python-virtualenv

In Ubuntu you can run:

sudo apt-get install python-virtualenv

For other operating systems without package manager, please check: http://www.virtualenv.org/en/latest/#installation

Setting a virtualenv environment

  1. Create a new virtualenv:
virtualenv ENV
  1. Activate it (example using BASH):
source ENV/bin/activate
  1. Upgrade pip (some distros package an outdated version of virtualenv):
pip install --upgrade pip
  1. Install ftp-cloudfs:
pip install ftp-cloudfs

The install command will finish with something like:

Successfully installed ftp-cloudfs pyftpdlib python-swiftclient python-daemon python-memcached d2to1 pbr simplejson lockfile

You can verify the install with:

ftpcloudfs --version

Important: Please note that in order to use the server in the future you'll need to activate the environment as we did in point 2.

2. Basic configuration

We need to know the authentication URL for the OpenStack Object Storage service we're going to use.

For Rackspace (Cloud Files, compatible with OpenStack Object Storage):

Other OpenStack Object Storage providers will have a different URL, for example:

The service can be configured creating a /etc/ftpcloudfs.conf file, but for sake of simplicity we're going to use command line options.

We can run the server with any regular user (root is not needed!):

ftpcloudfs -a https://auth.storage.memset.com/v1.0 -f

(replace the auth URL as required, using Memstore in the example)

This will run the server at localhost and port 2021, we can stop the server by pressing CTRL + C on the terminal where the server is running (we're using the -f flag).

Now we can use our favourite FTP client to login at: ftp://127.0.0.1:2021/

We need to use the credentials provided by our provider (user and password). Please refer to your cloud storage provider's documentation.

Troubleshooting

If there's any error, look for information in the terminal where the server is running. Alternatively you can add -v flag to the server command line and repeat the operation to get extra information (this is very useful if you think you're found a bug and want to report it!).

You may check the FAQ: https://github.com/chmouel/ftp-cloudfs/wiki/FAQ

2. A better configuration

Although the basic configuration can be enough for most uses, you may want to use several connections at the same time to improve the server's performance.

For that we recommend you to install memcache (again, use your system's package manager), and run the server with:

ftpcloudfs -a https://auth.storage.memset.com/v1.0 --memcache=127.0.0.1:11211 --log-file /tmp/ftpcloufs.log

This means:

  • We're using memcache as shared cache to speed up operations. Mecache needs to be installed and running on localhost port 11211 (default).
  • We're logging into /tmp/ftpcloufs.log. This is because we can't use -f flag (it implies just one worker) and now the server is detached from the terminal. We recommend using --syslog for production, but for a personal server logging into a file it's all right.

Note that you need to stop the server getting its PID from /tmp/ftpcloudfs.pid and using kill command to send a SIGTERM signal. You can use:

kill `cat /tmp/ftpcloudfs.pid`

Remember that you can check /tmp/ftpcloufs.log to verify the server is running as you expect.