Tag

Knownhost Archives - JB Woodruff Design

Having “File Permission” Issues with WordPress on your VPS?

By | How To, I'm a Nerd, Website, Wordpress | 5 Comments

When I first installed WordPress on my new VPS server I wasn’t able to upload photos. All I saw was this.

‘An error occurred in the upload. Please try again later.’ Ok.

I did a lot of reading, but couldn’t really find anything. I knew that if I set my folder permissions to 777 that it would do the trick, but I also knew this wasn’t the right solution as this effectively makes it so anyone can access that folder.

End of the day I contact the service folks at my service provider Knownhost who gave me an excellently easy solution in their response. Their service team is awesome.

This is actually a known issue with WordPress using mod_php (DSO) as the PHP handler; in essence, your files (owned by your account) have limited permissions to the webserver (the account “nobody” on a cPanel server) which actually executes PHP code. The better solution (not 777 permissions) is to change the PHP handler to SuPHP, which causes PHP scripts to be run as your account (not as nobody) and thus prevent this issue. You can find an overview of the various common PHP handlers at http://boomshadow.net/tech/php-handlers/ which does specifically address the problem of uploads via PHP script while using DSO.

In shared hosting environments (like DreamHost, who I gather you recently left), SuPHP is by far more common as it prevents certain potential server compromises (related to the fact that under DSO PHP scripts are executed using an account other than your own; especially coupled with 777 permissions, it’s possible for an attacker to modify or inject a PHP script to run arbitrary code, and then gain access to every file which the webserver user can access). We default to DSO on our VPS’s simply because it’s much faster (when used appropriately).

There you have it. I flipped one setting in WHM and everything was working beautifully again.

PHPHandler

To do this: Access WHM > Go to Service Configuration > Configure PHP and suEXEC > Change your PHP handler to suphp. Save.

Dreamhost

Moving from a Shared Host to a VPS

By | I'm a Nerd, Technology, Website, Wordpress | No Comments

This past weekend marked a change that was long overdue. I had been struggling with my web host, Dreamhost, for about a month trying to figure out why my sites were performing so sluggishly. I have been a longtime Dreamhost advocate and customer (since 2004). I contacted them multiple times and was informed that ‘everything was behaving normally.’ I disagreed.

Then it happened. A week ago, the server hosting my sites (note: this is my and my client sites) had a catastrophic hardware failure. My sites were dead. Things had gone from bad to worse.

Initially their support was responsive and helpful. They said that they would be restoring files from their backups and things should be running normally soon. I gave it a couple of days and things weren’t working. Sites were taking 30-45 seconds to load; if at all. I don’t really consider that working for my clients and decided to pursue the support route. This time they weren’t responsive. In fact, they still have not responded to my direct requests and it has been 5 days.

I started looking to other hosts. I considered Bluehost, Hostgator and some others due to their favorable reviews. I looked into best WordPress hosts now that I’m developing wordpress sites for my clients. I also started looking at VPS hosting. Virtual Private Server (VPS) hosting promised me dedicated CPU, RAM and HD space at a moderate price increase above shared hosting. Reliving the sluggishness of my sites even before the hardware failure, I was sold.

A weekend of configuration and installation later. I’m loving it. It wasn’t easy, but my new host was awesome and very fast to respond. If you’re looking for a speed boost and more control definitely look into VPS. I can recommend Knownhost.