[ckan-dev] File upload error

Sean Hammond sean.hammond at okfn.org
Wed Sep 5 11:21:25 UTC 2012


I just tested file storage with a CKAN 1.7.1 package install on Ubuntu
10.04 and it works fine for me, so it must be something to do with your
setup. Setting up filestore can be a little tricky..

> 1. package install

So this is a CKAN 1.7.1 package install on Ubuntu 10.04, right?

> 2. pairtree install

Actually on testing, it looks like pairtree gets installed automatically
when you install the CKAN 1.7.1 package. Running
`aptitude show python-pairtree` should verify this (it should say
"State: installed"). I'm guessing you've also done
`sudo pip install pairtree`? It shouldn't make any difference anyway,
your pairtree version looks fine in your pip freeze.

> 3. create a local storage folder and change permission (rwx)

You need to make sure that the user www-data has permissions for the
storage dir. It looks like you're trying to use /var/local/ckan as your
storage dir, so:

    sudo mkdir -p /var/local/ckan
    sudo chown www-data /var/local/ckan
    sudo chmod u+rwx /var/local/ckan
    sudo service apache2 restart

> 4. update std.ini
> 
> [app:main]
> ckan.storage.bucket = uploads
> ## OFS configuration
> ofs.impl = pairtree
> # directory on disk for data storage (should be empty)
> ofs.storage_dir = /var/local/ckan

This looks correct.

> I attached apache log and a result of 'pip freeze' command.

Your pip freeze looks fine. Is the attached apache log file really the
entire log file? I would expect to see more than that. For example, if
your CKAN instance is called std, can you attach the entire contents of
the file at /var/log/apache2/std.error.log ?




More information about the ckan-dev mailing list