Tag Archives: OpenBSD

Update of this site took a little while to succeed

My guess is that something with the devio.us server made it difficult for me to update this site’s WordPress software to version 3.8. I failed in a number of attempts in the past month  or so. But today I was able to do the update, and now this site is fully patched.

I suspect that the devio.us admins made a change/fix. However it happened, it’s nice to have an up-to-date WordPress installation.

How to deal with the 403 problem when changing your permalinks in WordPress

Every time I changed my permalink style in this WordPress install on the devio.us OpenBSD system, I get locked out of the entire blog, unable to access the dashboard or the live site. All I get is a 403 error in the browser.

I deleted the blog and its database multiple times but kept falling into the same trap: Change permalinks, get locked out, clear database, reinstall …

Then I went for help, and found it from moderator Samuel B the WordPress.org forum. The hack to fix this lies in the .htaccess file, both what’s in it and its permissions. From the above forum post, here is the hack:

delete present .htaccess
upload blank .htaccess
chmod 666
set permalinks to desired (in the WordPress Dashboard)
chmod .htaccess back to 644 for security

I did this in the shell (aka console aka command line). In my setup I don’t need rootly privileges to do any of this, so my shell lines begin with $ instead of #, and I don’t need to use sudo.

The first line gets me to my blog directory, the rest is the same wherever you are:
$ cd /public_html/blog
$ rm .htaccess
$ touch .htaccess
$ chmod 666 .htaccess

(Now reset permalinks in the WordPress Dashboard)
$ chmod 644 .htaccess

Installing WordPress on the devio.us OpenBSD system

wolfmanThe first “project” on Master and Server is the installation of the WordPress.org blogging software in my account at devio.us.

So what is devio.us? It’s an OpenBSD server run by a group of sysadmins who offer free shell accounts and web-server space to interested users of this security-minded BSD project. For reasons to which I’m not privvy, devio.us is not currently offering new shell accounts.

I’ve done a lot of experimenting with my OpenBSD account at devio.us, on which I’ve run a whole bunch of services. I’ve had trouble with the Perl/CGI-based blogging systems — Ode and Blosxom — that I’ve tried but not so much trouble with PHP-based systems. Before now I’ve successfully run FlatPress, and today I was able to create a database (it was pretty much created for me by the system; that’s how things work in the one-database-per-account world of devio.us), then download, extract and install WordPress.

And yes, it did take about five minutes. My last WordPress.org install was a multisite system, and that takes longer, for sure (especially because multisite requires more configuration), but a single-site system goes together like butter, as they say.

I’m not sure how many people run WordPress on OpenBSD. For me anyway, it’s hard to get scripting of any kind running on OpenBSD’s chrooted Apache web server, and I thank the devio.us sysadmins for making that happen for me and the rest of the devio.us users: PHP runs great (though the lack of the php-zip or pecl-zip modules make it impossible to run OwnCloud on the system), and Perl/CGI does, too, though the latter is hampered by what I think are permission or file ownership issues that were beyond my capability to sort out.

However much PHP is derided as a poor choice for web applications (“it’s not as good as *fill in the blank*,” “it’s not secure”), more of the web uses it than not, it’s flexible, fast, you can embed it in HTML at will, and it usually just works.

I pretty much followed the WordPress.org installation directions and had a working system in the promised five minutes.

And here I am with an OpenBSD/Apache/MySQL-running WordPress.org system.

.htaccess problem solved: In the days since this original post was written, I did about 15 five-minute installs on this server, getting 403 errors in the WordPress Dashboard and on the live site after making changes to the permalinks settings.

After repeatedly clearing the database and reinstalling WordPress, I learned that what was locking me out was a bad .htaccess file. Luckily it’s very fixable.