WP auto upgrade/plugin updates, file owners and CHOWN

This has been a vexing activity lately: attempting to perform WP auto-updates and plugin updates on multiple WP installations end in failure. I thought the problem simply came down to deleting or chmodding 777 the offending directories (such as upgrades and/or uploads). When that turned out to be an unwieldy and insecure proposition, I turned to what I suspected might be an FTP issue, by switching to ProFTP server. Still unsuccessful, I suspected an SSH issue–no dice. A file system method switch in wp-config for WP? Nope, not that either. Trying to install suExec for PHP? It was already enabled, and forcing a recompile nearly crashed my server.

In the end, what gave me a clue was the section on file permissions in the WP codex and some forum posts suggesting ownership changes. A handy phpinfo-type script such as <--!? php echo(exec("whoami")); --> dropped in the appropriate directories aided in identifying ownership of certain folders.

It turns out that since I’ve been using FileZilla SFTP with root (yes, I know it’s highly insecure) credentials, I’d been carelessly uploading WordPress folders and plugins with root ownership, causing havoc with the auto-update system. Since the affected folders weren’t owned by the user, the user could not use their own ftp credentials to update their WP installations. I would either see error messages such as not being able to download files to the upgrades folder or unable to create plugin directories–all because the user did not own those folders.

Unfortunately, FileZilla doesn’t have a mechanism to check ownership. It only permitted chmodding file permissions, as far as I could tell. This of course created even more of a mess because I was chmodding under root, not user.

I used shell access (e.g. PuTTy) to identify ownership. To list folders and file ownership in a directory:

ls -l folderpath

To change ownership of a folderpath:

chown -R username:usergroup folderpath

where -R applies changes recursively. For my dedicated server setup, username and usergroup happened to be the same (I did not set up user groups in Apache). In this instance, folderpath referred to the root directory where WordPress was installed. Incidentally, changing the ownership of the folders reset all of the directory permissions to 755, and file permissions to 644–exactly how I wanted them.

This may have also corrected my issue with PHP sessions (still testing) with Captcha logins and form submission. I enabled PHP sessions and restored directory permissions on the working Captcha folders to 755. Will continue to test this.

Also, be wary of changing ownership on public_html. One of my sites had user:user ownership on the folder, causing the website to be inaccessible. Chown-ing the public_html back to user:nobody fixed the issue.

Too hot for this JM

I discovered my Asahi zuru in dire straits–walked out on the porch yesterday and noticed that most of its leaves were curled and drying. I questioned the waterboy–who swore he had been giving the japanese maple plenty of water. Then he later recanted, stating that maybe he missed it after all. So, basically, the poor tree has been struggling through the past few 100 degree days…can it be rescued?

6/16/2011 Dry Japanese Maple (1) 6/16/2011 Dry Japanese Maple (2) 6/16/2011 Dry Japanese Maple (3)

Despite several gallons of water to saturate the soil, I believe more than 75% of the foliage will be lost. I am just waiting to see when they will be dropping off. I hate to write off this JM even though it lost most of its variegation last year and probably won’t get it back. It’s still a Japanese maple and pretty in that JM way.

Ants and vinca

One of my Titan vinca seedlings–still planter box squatting–bloomed this morning: a pale pink with rosy center. But where are all these blasted black ants coming from? They seem to favor the vinca and are chewing tiny holes into them–all of them! I’m readying the spreader to drop the insect-killer on them!

6/14/2011 Pink Titan vinca

Herbs and blooms June

The newest salvia greggii in the salvia bed has bloomed finally. Also, I’ve noted that the confetti lantanas and Purple Star verbenas in the front bed are enjoying their new home. The recent Hot Lips salvia addition keeps growing and growing…soon it will sprawl like the other Hot Lips in this bed. The dahlberg daisies are irrepressible, non-stop bloomers. As is the Thai basil, shortly before I gave it a haircut.

6/13/2011 Herbs and Blooms June (1) 6/13/2011 Herbs and Blooms June (2) 6/13/2011 Herbs and Blooms June (3) 6/13/2011 Herbs and Blooms June (4) 6/13/2011 Herbs and Blooms June (5) 6/13/2011 Herbs and Blooms June (6) 6/13/2011 Herbs and Blooms June (7) 6/13/2011 Herbs and Blooms June (8) 6/13/2011 Herbs and Blooms June (9) 6/13/2011 Herbs and Blooms June (10) 6/13/2011 Herbs and Blooms June (11) 6/13/2011 Herbs and Blooms June (12) 6/13/2011 Herbs and Blooms June (13) 6/13/2011 Herbs and Blooms June (14) 6/13/2011 Herbs and Blooms June (15) 6/13/2011 Herbs and Blooms June (16) 6/13/2011 Herbs and Blooms June (17)