Failed to save the current database to the specified location!

Help
ederopaa
2014-01-28
2014-02-01
  • ederopaa
    ederopaa
    2014-01-28

    Hi,

    Using Keepass 2.18 on linux and 2.24 on Win7. I have a Apache/2.2.22 running on Ubuntu 12.04 LTS. I created and copied the initial file.kdbx onto my server with permissions -rw-rw-rw-. I have no problem opening the file from server on either client.

    Apache access.log says:

    xxx.xxx.xxx - user [28/Jan/2014:21:10:00 +0200] "GET /xxx/file.kdbx HTTP/1.1" 200 2123 "-" "-"

    But when saving it I get:

    Failed to save the current database to the specified location! The remote server returned an error: (405) Method Not Allowed. The target file might be in a corrupted state. Please try saving again, and if that fails, save the database to a different location.

    Apache access.log says:

    xxx.xxx.xxx - user [28/Jan/2014:21:12:15 +0200] "GET /xxx/file.kdbx HTTP/1.1" 200 2067 "-" "-"
    xxx.xxx.xxx - user [28/Jan/2014:21:12:15 +0200] "DELETE /xxx/file.kdbx.tmp HTTP/1.1" 405 537 "-" "-"
    xxx.xxx.xxx - user [28/Jan/2014:21:12:15 +0200] "PUT /xxx/file.kdbx.tmp HTTP/1.1" 405 559 "-" "-"
    xxx.xxx.xxx - user [28/Jan/2014:21:12:15 +0200] "GET /xxx/file.kdbx HTTP/1.1" 200 2067 "-" "-"
    xxx.xxx.xxx - user [28/Jan/2014:21:12:15 +0200] "DELETE /xxx/file.kdbx HTTP/1.1" 405 533 "-" "-"

    I really want to use my webserver to host the db. Any hints on how to get things working?

    Thanks!

     
  • Paul
    Paul
    2014-01-29

    Saving the database requires read, write, rename and delete permissions - unless you turn off File Transactions, in which case you need read, write. I doubt you have set the permissions correctly in Apache.

    cheers, Paul

     
  • ederopaa
    ederopaa
    2014-01-29

    Thanks Paul for your response!

    I have been fiddling around with the permissions and owners of the folder after reading loads of Apache docs and how-to's. At the moment the owner and group is www-data (apache) and me as the user, belong to the group.

    4 -rwxrwxr-x 1 www-data www-data 1854 Jan 25 09:02 file.kdbx

    Any pointers on what to try next?

    It would be a great addition to the wiki on how to get a url-based keepass db setup. I'm sure I'm not the only one struggling with this.

    Thanks!

     
  • Paul
    Paul
    2014-01-30

    Disk file permissions are not the same as Apache web site permissions. You probably need to set permissions in the ".htaccess" file.

    cheers, Paul

     
  • ederopaa
    ederopaa
    2014-01-31

    I really tried hard to figure out how to get a basic http-setup working. No matter what I tried, I could not get PUT, DELETE and MOVE to work with my 12.04 Ubuntu and Apache setup. I tried a bunch of variable configuration directives in the .htaccess-file.

    I did however get things up and running very quickly after setting up WebDAV according to these instructions:

    https://www.digitalocean.com/community/articles/how-to-configure-webdav-access-with-apache-on-ubuntu-12-04

     
  • Paul
    Paul
    2014-02-01

    Glad it works.

    cheers, Paul