linux, Technology

The Final Guide to WordPress on your Ubuntu LAMP Server

I’ve gone over all the setup and nit-picky details of setting up my own web server. However, the one thing I could never get quite right was my WordPress install.  If you peruse the WordPress (and Ubuntu) user forums, you will see countless examples of people trying to get their permissions set right for one reason or another.  WordPress recommends, rather irresponsibly, CHMODing everying 777.  To compliment that, you should really find a theme with a large header saying “HACK ME.”  The problems range from being unable to upload pictures to having serious trouble with plugins, some of which won’t work at all without (again) CHMODing several parts of your WordPress Install to 777.

I’ve lived for several months with my blog like this…balancing usability with security, and totally unable to use the “Upgrade Automatically” feature in the plugins page.  If you’ve setup your own WordPress Server and worked with plugins much, you know how the process typically goes.  You Upload your plugin to the plugins folder.  Then via terminal, chown -R your new folder to www-data, perhaps chmod 777, depending on the plugin, and then go into your WordPress Admin page and activate.  Time for an update?  Same process.  Such a pain, with nary a solution in sight… at least that I could find on the forums.

The problem lies with this:  your files are uploaded (via ftp, or whatever) under your Ubuntu user name.  Apache owns web processes under the user name and group www-data.  So when WordPress tries to work on a folder owned by your username, it gets denied, because it is trying to work with it as www-data.  To fix this, I attempted to add my username to the www-data group, but that was unsuccessful.  And then I discovered the envvars file under /etc/apache2.  In this beautiful file, is the designated Apache username, www-data.  It looks something like this:

envvars – default environment variables for apache2ctl

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/

Just change the information to match your user name and group for Ubuntu, restart Apache, et voila!  Permissions and Ownership issues are resolved.  Now Apache is working with files under the same ownership and permissions set they were uploaded with.

One important caveat here:  I’m unsure about the security issues with this.  I’m going on the assumption that it is significantly more secure than CHMODing everything 777, and it certainly makes your Ubuntu/Wordpress Web Server much easier to use for upgrade purposes.  Plugins install and upgrade with no hassle now!

Hope this helps all of you with these issues.


DSLR of Choice?

Nikon D40
Nikon D40
I’m considering getting the Nikon D40.  Does anyone have any experience with this camera?  A recommendation for a better entry-level DLSR that has a decent selection of lenses?

Ramblings, Technology, Uncategorized

Because I’m interested:

How much do you blog / engage in social networking (facebook myspace, etc) at work?  Is this becoming a more accepted trend int he workplace?

Speaking of blogging and workplaces…I’ve been running a blog and a slew of social network marketing campaigns for work, and another professional blog…which explains my lack of desire to blog here about things that I truly find interesting.


WordPress for the iPhone.

I’m here in the office. This is my first post from the iPhone. The interface is simple but relatively straight forward. You can take a picture with the camera and stick it right on the post. Wish it worked in landscape though.


Online Living, Technology

eBay: more and more useless everday!

Back in the day, eBay was awesome.  Remember when you got super-good deals, from average Joes selling stuff out of their home?  I do…I bought an awful lot of electronics off of eBay, and sold quite a bit too.  Even back in 2003, though, I saw troubling signs, signaling the direction eBay was going.
I was selling an old laptop, with the intention of purchasing a new one.  Some guy offers me an extra $200 over my reserve if I end the bidding early.  Being quite naive about online scams, at the time, I said, “Sure!” and did just that.  I exchange the emails at work, and his final email instructs me, quite urgently, to ship it that very day.  I saw the money in Paypal, so I was planning on doing just that.  Thankfully, I had to stay at work a bit late that day, and didn’t get to the post office in time.  When I got home, I saw an email from Paypal, stating that the funds were fraudulent, and to not send the item.
I never heard from the guy again, obviously, but that was only the beginning of my troubles.  A near scam later on a purchase (took 2 weeks for the person to send it), and many many buyers who didn’t read the full listing concerning condition of a used item, and I was quite frustrated.
It’s been well over a year since I’ve used ebay, but when we found ourselves with a good deal of new-looking clothes that our daughter had outgrown, we decided to list them, and see what we could get.
We used to make this a regular habit, with most things selling, just a couple of years ago . . . but when I looked at the listings in the little girls categories, it’s mostly junk, mostly with no bids, and mostly sold by junkshop businesses with tons of other junk auction listings.
With eBay’s recent changes, (including allowing major businesses to list with no fee) it really isn’t the big neighborhood market it once was, and is either too pricey, or too scarey to deal with in any meaningful way.  We sold the books and DVD’s on, and are giving away the clothes.  Why pay fees when there’s little chance that anyone is even looking anymore? (Especially when other people don’t pay those fees to begin with.)
I declare eBay a has-been website…you heard it here first.  It’s already turned into that old shopping mall in town…the one with dollar stores, and cheap knockoffs, that’s really gone downhill since the newer and larger mall opened. . .  Only in this case, the newer mall is the increasingly competitive online retail market, which is more attractive now, than ever, considering eBay’s higher prices and fees.

linux, Technology

Server Headaches

Over the last… oh… 8 months or so, I’ve been casually putting together a LAMP server to host my blog and personal website on, and give myself access to files from work, etc.  Last week, I believed I had it reasonably prepared for entrance into the World Wide Web.  My CPU then jumped up, slapped me in the face, called me a B!%^#, and attempted to destroy my server.
I forwarded my ports, and nothing worked.  So I decided to go editing config files for Apache.  That was all well and good, until I really screwed something up . . . not sure what.  This led me to uninstall my server programs: Apache, MySQL, PHP, and supporting modules.  I attempted to reinstall, but the computer flipped out everytime.
Several reboots, and some manual file cleaning later, I just wiped the hard drive and resinstalled Ubuntu.  Their sudo tasksel command, which I learned during this process, made the reinstallation of the LAMP server super easy and quick.  I had a little trouble using phpMyAdmin, until I linked it to my /var/www folder, reinstalled WordPress, et voila!  Back where I started.  With ports forwarded, I was still unable to access the server from the web.  I noticed later that I was connected to the IP for my modem, not the USABLE IP assigned to me by my ISP.  I must be honest:  I have no idea what that means.  Hopefully I’ll get the opportunity to call tech support and have them walk me through what to do with those IP addresses.
Anyone know if Apache should be configured past its initial installtion?  Is the server ready to go as soon as the IP address route properly, or do I need to configure apache for my domain?
All of this has led me down a very interesting chain of ideas.  In the coming months, I have a new website that should be launching, and I’m pretty excited about the idea.  It will hopefully be different from other things you’ve been seeing.


Ubuntu 8.04 Coming Soon!

I’m not a fan of Microsoft. I loved my old Apple Powerbook, but got rid of it awhile back, and hope to get a new Apple MacBook Pro some day soon. In the meantime, though, I’ve fallen in love with Ubuntu. I’ve played with Linux distros for 5 or 6 years now, and Ubuntu is the first I’ve seen that truly gives that polished, pretty, Consumer GUI feel that Mac or Windows does.
And I’m geeking out over the new version of Ubuntu being released in just 3 short days! I’ve been playing with creating my own LAMP server for several months for hosting this very blog, and even wrote about it at my blog’s old homepage (which is, by the way, where you can read my older stuff). Although I haven’t found the time or the patience to learn how to finish my setup, I plan to one day. 🙂
Even if you think Windows is the best thing in the world, I strongly encourage you to give Ubuntu 8.04 a try. This is first linux brand that I heartily recommend to non-ubergeeks. Even my wife uses Ubuntu with great ease. It’s secure, stable, and FREE! You can’t beat free, in my experience.

linux, Technology

Ubuntu 7.10: Installation Attempt 1

Well, by the title, you can see that I did not succeed in my first installation attempt.  The installation CD is also a live CD.  Basically meaning that you can run Ubuntu totally off the CD, without installing on your hard drive.  I played with a few features in the live boot.  In short, Ubuntu is beautiful.  It looks like a third major OS, next to Windows and Mac.  It runs smoothly, and is easy enough for a first time or clueless computer user to use.  The installation instructions were in plain English.  Actually, I would say installation was easier than Windows…significantly so.  I believe that a total computer novice could install Ubuntu first time…given that it works right…
…which brings me to my first issue.  An easy to understand an informative error box popped up and explained that I had an error on my CD, that I should reburn it at a slower speed, or move my computer to a cooler area.  Huh?
My computer is cool enough, thank you.  I didn’t have the time to reburn the CD…I will try that.  This is the only negative thing I have to say about Ubuntu thus far.  It looks like an amazing OS, and I’m pretty excited to try out more.