WordPress FTPS is not SFTP

Is WordPress giving you server errors when you try to update or upload themes? Are your only two options FTP and FTPS (which is not SFTP)? Here’s how to fix that, make WordPress work with SSH, giving you an SSH2 option for updating. And it works.

A major shout of thanks goes to Jon for his WordPress post entitled Enabling SSH/SFTP Updates.

I’d been struggling with making WordPress updates work properly for the longest time, setting up file ownerships and permissions. Things always seemed to be mostly right. If I tried to do an update of any form, I’d see this:

Error: There was an error connecting to the server

WordPress offers FTP and FTPS (SSL).

I’d try the secure option and things just would not work. Then I’d go examine my SFTP connections and my SSH, and it’d all be working fine.

It took bdawson‘s post on FTPS vs. SFTP to make me realize I was so falling into the habit of typing STFP that I didn’t realize that wasn’t what WordPress was offering!

With Jon’s post, enabling SFTP in WordPress becomes trivial.

  1. # apt-get install libssh2-php
  2. # /etc/init.d/apache2 restart

The SSH2 option then presents itself, and all is right in the world. Thanks guys!

Hibernate Schema Update Problems

For a while I’ve been having problems trying to get a SchemaUpdate working with Hibernate. Turns out the problem was me, not Hibernate. Newly created tables had a blank ACL, and I just needed to set them.

I’ve been using Hibernate for relational persistence for a while now, and I have to say it’s been working out pretty well.

That was, until I went to do a SchemaUpdate.

The moment I did an alternation of a table, or created a new entity, things went sour, and I was unable to read my old data. Was it me, or was it Hibernate?

could not initialize a collection
PSQLException: ERROR: permission denied for relation newtablejustadded

It was me.

Turns out Hibernate’s update was working just fine. There was no magic versioning or class hashing going on, detecting the change to the database.

The problem was the ACL was blank for the newly created entity table (I was using Postgres).

By issuing this command, all was fine again:

GRANT INSERT, SELECT, UPDATE, DELETE, REFERENCES ON newtable TO GROUP agroupIwasusing;

Since it took a while to figure out what was going on, I thought I’d post this to help others that follow a similar, yet frustrating, path.